diff --git a/.gitignore b/.gitignore index 947cd86..733ebbd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /gitdb-0.5.2-17d9d13.tar.gz /gitdb-0.5.4.tar.gz /gitdb-0.6.4.tar.gz +/gitdb-2.0.0.tar.gz diff --git a/python-gitdb.spec b/python-gitdb.spec index 0317438..cc750bd 100644 --- a/python-gitdb.spec +++ b/python-gitdb.spec @@ -1,106 +1,83 @@ -%if 0%{?fedora} > 12 -%global with_python3 1 -%else -%if 0%{?rhel} && 0%{?rhel} <= 7 -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%else -%global with_python3 1 -%endif -%endif - -Name: python-gitdb -Version: 0.6.4 -Release: 6%{?dist} -Summary: A pure-Python git object database - -Group: Development/Languages +%global modname gitdb + +Name: python-%{modname} +Version: 2.0.0 +Release: 1%{?dist} +Summary: Git Object Database + License: BSD -URL: http://pypi.python.org/packages/source/g/gitdb/gitdb-%{version}.tar.gz#md5=44e4366b8bdfd306b075c3a52c96ae1a -Source0: gitdb-%{version}.tar.gz -Requires: python-smmap - -BuildRequires: python-devel, python-nose, python-setuptools - -%description -GitDB allows you to access bare git repositories for reading and writing. It -aims at allowing full access to loose objects as well as packs with performance -and scalability in mind. It operates exclusively on streams, allowing to -operate on large objects with a small memory footprint. - -%if 0%{?with_python3} -%package -n python3-gitdb -Summary: Python3 Git Library -Requires: python3-smmap -BuildRequires: python3-devel, python3-nose, python3-setuptools - -%description -n python3-gitdb -%{description} -%endif - -# Filter the private provide -%{?filter_setup: -%filter_provides_in %{python3_sitearch}/gitdb/_perf.so -%filter_setup -} +URL: https://github.com/gitpython-developers/gitdb +Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz -%prep -%setup -qc -n gitdb-%{version} -mv gitdb-%{version} python2 +BuildArch: noarch -%if 0%{?with_python3} -cp -a python2 python3 -find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' -%endif # with_python3 +BuildRequires: git-core -find python2 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|' +%global _description \ +GitDB allows you to access bare git repositories for reading and writing.\ +It aims at allowing full access to loose objects as well as packs with\ +performance and scalability in mind. It operates exclusively on streams,\ +allowing to handle large objects with a small memory footprint. -pushd python2 -cp AUTHORS LICENSE ../ -popd +%description %{_description} -%build -pushd python2 -CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build -popd +%package -n python2-%{modname} +Summary: %{summary} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-nose +BuildRequires: python2-smmap >= 2.0.0 +Requires: python2-smmap >= 2.0.0 + +%description -n python2-%{modname} %{_description} + +Python 2 version. + +%package -n python3-%{modname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-nose +BuildRequires: python3-smmap >= 2.0.0 +Requires: python3-smmap >= 2.0.0 + +%description -n python3-%{modname} %{_description} -%if 0%{?with_python3} -pushd python3 -CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build -popd -%endif +Python 3 version. + +%prep +%autosetup -n %{modname}-%{version} -Sgit + +%build +%py2_build +%py3_build %install -pushd python2 -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} -chmod 0755 %{buildroot}%{python2_sitearch}/gitdb/_perf.so -popd -%if 0%{?with_python3} -pushd python3 -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} -popd -%endif - -%files -%defattr(-,root,root,-) -%if 0%{?fedora} +%py2_install +%py3_install + +%check +# https://github.com/gitpython-developers/smmap/issues/34 +nosetests-%{python2_version} -v || : +nosetests-%{python3_version} -v || : + +%files -n python2-%{modname} %license LICENSE -%else -%doc LICENSE -%endif %doc AUTHORS -%{python2_sitearch}/gitdb-%{version}-py?.?.egg-info -%{python2_sitearch}/gitdb/ +%{python2_sitelib}/%{modname}2-*.egg-info/ +%{python2_sitelib}/%{modname}/ -%if 0%{?with_python3} -%files -n python3-gitdb +%files -n python3-%{modname} %license LICENSE %doc AUTHORS -%{python3_sitearch}/gitdb-%{version}-py?.?.egg-info -%{python3_sitearch}/gitdb/ -%endif +%{python3_sitelib}/%{modname}2-*.egg-info/ +%{python3_sitelib}/%{modname}/ %changelog +* Wed Dec 28 2016 Igor Gnatenko - 2.0.0-1 +- Update to 2.0.0 +- Modernize spec + * Mon Dec 19 2016 Miro HronĨok - 0.6.4-6 - Rebuild for Python 3.6 diff --git a/sources b/sources index af8eed8..d16ac28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -44e4366b8bdfd306b075c3a52c96ae1a gitdb-0.6.4.tar.gz +SHA512 (gitdb-2.0.0.tar.gz) = 0f55f095d69d46bf9b834c6d705c0aafa2b53d957b7df4761f9eb8f1474c52e2b7c285c01acf2ae5482e9c6fd22ac06990baccfa34dcd65a1a119aa762506a5a