diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 7ad4506f6d30206d28adc5355ae4ad3e79e5c5db..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# python-psycopg2 - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index 923b1341f655744a21aedf5cd531ca86fdb70d30..7cfa13f9b2c15d109f12c0ed480381f9047bb8cb 100644 --- a/README.md +++ b/README.md @@ -1,39 +1 @@ # python-psycopg2 - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/psycopg2-2.7.5.tar.gz b/psycopg2-2.7.5.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9e1d892bcc04a31204851ff63b92be37fe1b27ed Binary files /dev/null and b/psycopg2-2.7.5.tar.gz differ diff --git a/python-psycopg2.spec b/python-psycopg2.spec new file mode 100644 index 0000000000000000000000000000000000000000..25298f686c1e4e24b756650c8ab0737df527c59b --- /dev/null +++ b/python-psycopg2.spec @@ -0,0 +1,197 @@ +Name: python-psycopg2 +Version: 2.7.5 +Release: 3.1 +Summary: PostgreSQL database adapter for the Python programming language +License: LGPLv3+ with exceptions +URL: http://www.psycopg.org/psycopg/ +Source0: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-7/psycopg2-%{version}.tar.gz + +%bcond_without python2 +%bcond_without python3 +%bcond_without check + +%global desc Psycopg is the most popular PostgreSQL adapter for the Python \ +programming language. Its core is a complete implementation of the Python DB \ +API 2.0 specifications. Several extensions allow access to many of the \ +features offered by PostgreSQL. + +%global python_runtimes %{?with_python2:python2 python2-debug} \\\ + %{?with_python3:python3 python3-debug} + +%{!?with_python2:%{!?with_python3:%{error:one python version eneeded}}} + +BuildRequires: gcc,pkgconfig(libpq) + +%{?with_python2:BuildRequires: python2-debug python2-devel} +%{?with_python3:BuildRequires: python3-debug python3-devel} + +%if %{with check} +BuildRequires: postgresql-test-rpm-macros +%endif + +%description +%{desc} + + +%package -n python2-psycopg2 +%{?python_provide:%python_provide python2-psycopg2} +Summary: %{summary} + +%description -n python2-psycopg2 +%{desc} + + +%package -n python2-psycopg2-tests +Summary: A testsuite for %{summary} +Requires: python2-%srcname = %version-%release + +%description -n python2-psycopg2-tests +%desc +This sub-package delivers set of tests for the adapter. + + +%package -n python2-psycopg2-debug +Summary: A PostgreSQL database adapter for Python 2 (debug build) +# Require the base package, as we're sharing .py/.pyc files: +Requires: %{name} = %{version}-%{release} +%{?python_provide:%python_provide python2-psycopg2-debug} + +%description -n python2-psycopg2-debug +This is a build of the psycopg PostgreSQL database adapter for the debug +build of Python 2. + +%if %{with python3} +%package -n python3-psycopg2 +Summary: %{summary} +%{?python_provide:%python_provide python3-psycopg2} + +%description -n python3-psycopg2 +%{desc} + + +%package -n python3-psycopg2-tests +Summary: A testsuite for %{summary} +Requires: python3-%srcname = %version-%release + +%description -n python3-psycopg2-tests +%desc +This sub-package delivers set of tests for the adapter. + +%package -n python3-psycopg2-debug +Summary: A PostgreSQL database adapter for Python 3 (debug build) +# Require base python 3 package, as we're sharing .py/.pyc files: +Requires: python3-psycopg2 = %{version}-%{release} + +%description -n python3-psycopg2-debug +This is a build of the psycopg PostgreSQL database adapter for the debug +build of Python 3. +%endif # python3 + + +%package doc +Summary: Documentation for psycopg python PostgreSQL database adapter +Group: Documentation +Requires: %{name} = %{version}-%{release} +%{?with_python2:Provides: python2-psycopg2-doc = %{version}-%{release}} +%{?with_python3:Provides: python3-psycopg2-doc = %{version}-%{release}} + +%description doc +Documentation and example files for the psycopg python PostgreSQL +database adapter. + +%prep +%autosetup -p1 -n psycopg2-%{version} + + +%build +for python in %{python_runtimes} ; do + $python setup.py build +done + +# Fix for wrong-file-end-of-line-encoding problem; upstream also must fix this. +for i in `find doc -iname "*.html"`; do sed -i 's/\r//' $i; done +for i in `find doc -iname "*.css"`; do sed -i 's/\r//' $i; done + +# Get rid of a "hidden" file that rpmlint complains about +rm -f doc/html/.buildinfo + +%check +%if %{with check} +export PGTESTS_LOCALE=C.UTF-8 +%postgresql_tests_run + +export PSYCOPG2_TESTDB=${PGTESTS_DATABASES##*:} +export PSYCOPG2_TESTDB_HOST=$PGHOST +export PSYCOPG2_TESTDB_PORT=$PGPORT + +cmd="from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')" + +%if %{with python2} +PYTHONPATH=%buildroot%python2_sitearch %__python2 -c "$cmd" --verbose +%endif + +%if %{with python3} +PYTHONPATH=%buildroot%python3_sitearch %__python3 -c "$cmd" --verbose +%endif +%endif # check + + +%install +for python in %{python_runtimes} ; do + $python setup.py install --no-compile --root %{buildroot} +done + +# This test is skipped on 3.7 and has a syntax error so brp-python-bytecompile would choke on it +%{?with_python3:rm -r %{buildroot}%{python3_sitearch}/psycopg2/tests/test_async_keyword.py} + +%if %{with python2} +%files -n python2-psycopg2 +%license LICENSE +%doc AUTHORS NEWS README.rst +%dir %{python2_sitearch}/psycopg2 +%{python2_sitearch}/psycopg2/*.py +%{python2_sitearch}/psycopg2/*.pyc +%{python2_sitearch}/psycopg2/_psycopg.so +%{python2_sitearch}/psycopg2/*.pyo +%{python2_sitearch}/psycopg2-%{version}-py2*.egg-info + + +%files -n python2-psycopg2-tests +%{python2_sitearch}/psycopg2/tests + + +%files -n python2-psycopg2-debug +%license LICENSE +%{python2_sitearch}/psycopg2/_psycopg_d.so +%endif # python2 + + +%if %{with python3} +%files -n python3-psycopg2 +%license LICENSE +%doc AUTHORS NEWS README.rst +%dir %{python3_sitearch}/psycopg2 +%{python3_sitearch}/psycopg2/*.py +%{python3_sitearch}/psycopg2/_psycopg.cpython-3?m*.so +%dir %{python3_sitearch}/psycopg2/__pycache__ +%{python3_sitearch}/psycopg2/__pycache__/*.py{c,o} +%{python3_sitearch}/psycopg2-%{version}-py3*.egg-info + + +%files -n python3-psycopg2-tests +%{python3_sitearch}/psycopg2/tests + + +%files -n python3-psycopg2-debug +%license LICENSE +%{python3_sitearch}/psycopg2/_psycopg.cpython-3?dm*.so +%endif # python3 + + +%files doc +%license LICENSE +%doc doc examples/ + +%changelog +* Wed Feb 12 2020 openEuler Buildteam - 2.7.5-3.1 +- Package init