diff --git a/dulwich-0.18.4.tar.gz b/dulwich-0.18.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d306cfc16e44426a1e6ff213521564222d7ae581 Binary files /dev/null and b/dulwich-0.18.4.tar.gz differ diff --git a/dulwich-0.20.11.tar.gz b/dulwich-0.20.11.tar.gz deleted file mode 100755 index 90b7518e78c71ac98ba2c94898360a58f9b61ec7..0000000000000000000000000000000000000000 Binary files a/dulwich-0.20.11.tar.gz and /dev/null differ diff --git a/python-dulwich.spec b/python-dulwich.spec old mode 100755 new mode 100644 index cfcfd23f06988854ad1777cb1e416394f12691c8..469b4507abe4e3bc51a40f08577579fafab559ff --- a/python-dulwich.spec +++ b/python-dulwich.spec @@ -1,109 +1,119 @@ -%global _empty_manifest_terminate_build 0 -Name: python-dulwich -Version: 0.20.11 -Release: 1 -Summary: Python Git Library -License: Apachev2 or later or GPLv2 -URL: https://www.dulwich.io/ -Source0: https://files.pythonhosted.org/packages/fc/86/4bf0caafc7700904844ad3f25f212d5d8aea5889c67dbdaa66dd213b7203/dulwich-0.20.11.tar.gz - -Requires: python3-urllib3 -Requires: python3-certifi -Requires: python3-fastimport -Requires: python3-urllib3[secure] -Requires: python3-gpg -Requires: python3-pyinotify +%global srcname dulwich + +%global with_python3 0 +%global __provides_exclude_from ^(%{python2_sitearch}/.*\\.so)$ +%if 0%{?with_python3} +%global __provides_exclude_from ^(%{python3_sitearch}/.*\\.so)$ +%endif + +Name: python-%{srcname} +Version: 0.18.4 +Release: 1 +Summary: A python implementation of the Git file formats and protocols + +License: GPLv2+ or ASL 2.0 or GPLv2 +URL: https://www.dulwich.io/ +Source0: https://www.dulwich.io/releases/dulwich-0.18.4.tar.gz + %description -By default, Dulwich' setup.py will attempt to build and install the optional C -extensions. The reason for this is that they significantly improve the performance -since some low-level operations that are executed often are much slower in CPython. -If you don't want to install the C bindings, specify the --pure argument to setup.py:: - $ python setup.py --pure install -or if you are installing from pip:: - $ pip install dulwich --global-option="--pure" -Note that you can also specify --global-option in a -`requirements.txt `_ -file, e.g. like this:: - dulwich --global-option=--pure - -%package -n python3-dulwich -Summary: Python Git Library -Provides: python-dulwich -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-cffi -BuildRequires: gcc -BuildRequires: gdb -%description -n python3-dulwich -By default, Dulwich' setup.py will attempt to build and install the optional C -extensions. The reason for this is that they significantly improve the performance -since some low-level operations that are executed often are much slower in CPython. -If you don't want to install the C bindings, specify the --pure argument to setup.py:: - $ python setup.py --pure install -or if you are installing from pip:: - $ pip install dulwich --global-option="--pure" -Note that you can also specify --global-option in a -`requirements.txt `_ -file, e.g. like this:: - dulwich --global-option=--pure - -%package help -Summary: Development documents and examples for dulwich -Provides: python3-dulwich-doc -%description help -By default, Dulwich' setup.py will attempt to build and install the optional C -extensions. The reason for this is that they significantly improve the performance -since some low-level operations that are executed often are much slower in CPython. -If you don't want to install the C bindings, specify the --pure argument to setup.py:: - $ python setup.py --pure install -or if you are installing from pip:: - $ pip install dulwich --global-option="--pure" -Note that you can also specify --global-option in a -`requirements.txt `_ -file, e.g. like this:: - dulwich --global-option=--pure +Dulwich is a pure-Python implementation of the Git file formats and +protocols. The project is named after the village in which Mr. and +Mrs. Git live in the Monty Python sketch. + +%package -n %{srcname}-core +Summary: Shared files for Dulwich + +%description -n %{srcname}-core +Files to ensure functionality for both python2 and python3 packages of Dulwich. + +%package -n python2-%{srcname} +Summary: A python implementation of the Git file formats and protocols +%{?python_provide:%python_provide python2-%{srcname}} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pip +BuildRequires: python2-nose +BuildRequires: python2-sphinx +BuildRequires: python2-docutils +%if 0%{?rhel} < 7 || 0%{?fedora} < 14 +BuildRequires: python2-unittest2 +%endif +Requires: %{srcname}-core%{?_isa} = %{version}-%{release} + +%description -n python2-%{srcname} +Dulwich is a pure-Python implementation of the Git file formats and +protocols. The project is named after the village in which Mr. and +Mrs. Git live in the Monty Python sketch. + +%if 0%{?with_python3} +%package -n python3-%{srcname} +Summary: A python implementation of the Git file formats and protocols +%{?python_provide:%python_provide python3-%{srcname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-nose +BuildRequires: python3-sphinx +BuildRequires: python3-docutils +Requires: %{srcname}-core%{?_isa} = %{version}-%{release} + +%description -n python3-%{srcname} +Dulwich is a pure-Python implementation of the Git file formats and +protocols. The project is named after the village in which Mr. and +Mrs. Git live in the Monty Python sketch. +%endif %prep -%autosetup -n dulwich-0.20.11 +%autosetup -n %{srcname}-%{version} %build +%py2_build +%if 0%{?with_python3} %py3_build +%endif +pushd docs +# Not using {smp_flags} as sphinx fails with it from time to time +make html +rm -rf build/html/{.buildinfo,doctrees} +%if 0%{?with_python3} +sphinx-build-3 -b html -d py3/doctrees . py3/html +rm -rf py3/html/.buildinfo +%endif +popd %install +%py2_install +%if 0%{?with_python3} %py3_install -install -d -m755 %{buildroot}/%{_pkgdocdir} -if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi -if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi -if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi -if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi -pushd %{buildroot} -if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst -fi -touch doclist.lst -if [ -d usr/share/man ]; then - find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst -fi -popd -mv %{buildroot}/filelist.lst . -mv %{buildroot}/doclist.lst . +%endif +# Remove extra copy of text docs +rm -rf %{buildroot}%{python2_sitearch}/docs/tutorial/ +%if 0%{?with_python3} +rm -rf %{buildroot}%{python3_sitearch}/docs/tutorial/ +%endif + +#%check +# FIXME test_non_ascii fails cause of unicode issue +#nosetests -e non_ascii -w dulwich/tests -v + +%files -n %{srcname}-core +%doc AUTHORS README.md +%license COPYING +%{_bindir}/dul-* +%{_bindir}/%{srcname} -%files -n python3-dulwich -f filelist.lst -%dir %{python3_sitearch}/* +%files -n python2-%{srcname} +%doc docs/build/html/ +%{python2_sitearch}/%{srcname}* +%exclude %{python2_sitearch}/%{srcname}/tests* -%files help -f doclist.lst -%{_docdir}/* +%if 0%{?with_python3} +%files -n python3-%{srcname} +%doc docs/py3/html/ +%{python3_sitearch}/%{srcname}* +%exclude %{python3_sitearch}/%{srcname}/tests* +%endif %changelog -* Fri Nov 20 2020 Python_Bot +* Thu Apr 29 2021 openstack-sig - Package Spec generated