Update to 5.1, Introduce python3 subpackages (#1237118)
This commit is contained in:
parent
02a05b18b9
commit
6736e7ee38
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/qrcode-2.4.1.tar.gz
|
/qrcode-2.4.1.tar.gz
|
||||||
/qrcode-5.0.1.tar.gz
|
/qrcode-5.0.1.tar.gz
|
||||||
|
/qrcode-5.1.tar.gz
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
%global pkgname qrcode
|
%global pkgname qrcode
|
||||||
|
|
||||||
Name: python-%{pkgname}
|
Name: python-%{pkgname}
|
||||||
Version: 5.0.1
|
Version: 5.1
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Python QR Code image generator
|
Summary: Python QR Code image generator
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -10,10 +10,17 @@ URL: https://github.com/lincolnloop/python-qrcode
|
|||||||
Source0: http://pypi.python.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz
|
Source0: http://pypi.python.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python-devel
|
|
||||||
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
BuildRequires: python-imaging
|
BuildRequires: python-imaging
|
||||||
BuildRequires: python-six
|
BuildRequires: python-six
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-imaging
|
||||||
|
BuildRequires: python3-six
|
||||||
|
|
||||||
Requires: python-imaging
|
Requires: python-imaging
|
||||||
Requires: %{name}-core = %{version}-%{release}
|
Requires: %{name}-core = %{version}-%{release}
|
||||||
|
|
||||||
@ -25,25 +32,72 @@ generation of QR Codes.
|
|||||||
%package core
|
%package core
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
Conflicts: python-qrcode < 5.0
|
Conflicts: python-qrcode < 5.0
|
||||||
Summary: Python QR Code image generator (core library)
|
Summary: Python 2 QR Code image generator (core library)
|
||||||
|
|
||||||
%description core
|
%description core
|
||||||
Core Python module for QR code generation. Does not contain image rendering.
|
Core Python 2 module for QR code generation. Does not contain image rendering.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-%{pkgname}
|
||||||
|
Summary: Python QR Code image generator
|
||||||
|
Requires: python3-imaging
|
||||||
|
# For entry point:
|
||||||
|
Requires: python3-setuptools
|
||||||
|
Requires: python3-%{pkgname}-core = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python3-%{pkgname}
|
||||||
|
This module uses the Python Imaging Library (PIL) to allow for the
|
||||||
|
generation of QR Codes. Python 3 version.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-%{pkgname}-core
|
||||||
|
Requires: python3-six
|
||||||
|
Summary: Python 3 QR Code image generator (core library)
|
||||||
|
|
||||||
|
%description -n python3-%{pkgname}-core
|
||||||
|
Core Python 3 module for QR code generation. Does not contain image rendering.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pkgname}-%{version}
|
%setup -qc
|
||||||
|
|
||||||
|
mv %{pkgname}-%{version} python2
|
||||||
|
|
||||||
# The pure plugin requires pymaging which is not packaged in Fedora.
|
# The pure plugin requires pymaging which is not packaged in Fedora.
|
||||||
rm qrcode/image/pure.py*
|
rm python2/qrcode/image/pure.py*
|
||||||
|
|
||||||
|
# Remove shebang
|
||||||
|
sed -i '1d' python2/qrcode/console_scripts.py
|
||||||
|
|
||||||
|
cp -a python{2,3}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
pushd python2
|
||||||
|
%{__python2} setup.py build
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd python3
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
pushd python2
|
||||||
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
# Be sure binscripts are Python 3
|
||||||
|
rm %{buildroot}%{_bindir}/*
|
||||||
|
|
||||||
|
# Do not install tests
|
||||||
|
rm -r %{buildroot}%{python2_sitelib}/%{pkgname}/tests
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd python3
|
||||||
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
# Do not install tests
|
||||||
|
rm -r %{buildroot}%{python3_sitelib}/%{pkgname}/tests
|
||||||
|
popd
|
||||||
|
|
||||||
#
|
#
|
||||||
# In previous iterations of the package, the qr script had been
|
# In previous iterations of the package, the qr script had been
|
||||||
@ -55,35 +109,76 @@ ln -s qr %{buildroot}%{_bindir}/qrcode
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
# in lieue of a real test suite
|
# in lieue of a real test suite
|
||||||
for m in $(find qrcode -name '*.py' \
|
modules=$(find qrcode -name '*.py' \
|
||||||
| grep -v __init__ \
|
| grep -v __init__ \
|
||||||
| sort \
|
| sort \
|
||||||
| sed -e 's|/|.|g' \
|
| sed -e 's|/|.|g' \
|
||||||
| sed -e 's|.py$||g');
|
| sed -e 's|.py$||g');
|
||||||
|
|
||||||
|
|
||||||
|
pushd python2
|
||||||
|
for m in $modules;
|
||||||
do
|
do
|
||||||
%{__python} -c "import $m"
|
%{__python2} -c "import $m"
|
||||||
done
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd python3
|
||||||
|
for m in $modules;
|
||||||
|
do
|
||||||
|
%{__python3} -c "import $m"
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_bindir}/qr
|
%{python2_sitelib}/%{pkgname}/image/svg.py*
|
||||||
%{_bindir}/qrcode
|
%{python2_sitelib}/%{pkgname}/image/pil.py*
|
||||||
%{_mandir}/man1/qr.1*
|
|
||||||
%{python_sitelib}/%{pkgname}/image/svg.py*
|
|
||||||
%{python_sitelib}/%{pkgname}/image/pil.py*
|
|
||||||
|
|
||||||
|
|
||||||
%files core
|
%files core
|
||||||
%doc LICENSE README.rst CHANGES.rst
|
%doc python2/README.rst python2/CHANGES.rst
|
||||||
%dir %{python_sitelib}/%{pkgname}/
|
%license python2/LICENSE
|
||||||
%dir %{python_sitelib}/%{pkgname}/image
|
%dir %{python2_sitelib}/%{pkgname}/
|
||||||
%{python_sitelib}/%{pkgname}*.egg-info
|
%dir %{python2_sitelib}/%{pkgname}/image
|
||||||
%{python_sitelib}/%{pkgname}/*.py*
|
%{python2_sitelib}/%{pkgname}*.egg-info
|
||||||
%{python_sitelib}/%{pkgname}/image/__init__.py*
|
%{python2_sitelib}/%{pkgname}/*.py*
|
||||||
%{python_sitelib}/%{pkgname}/image/base.py*
|
%{python2_sitelib}/%{pkgname}/image/__init__.py*
|
||||||
|
%{python2_sitelib}/%{pkgname}/image/base.py*
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python3-%{pkgname}
|
||||||
|
%{_bindir}/qr
|
||||||
|
%{_bindir}/qrcode
|
||||||
|
%{_mandir}/man1/qr.1*
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/svg.py*
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/pil.py*
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/__pycache__/svg.*
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/__pycache__/pil.*
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python3-%{pkgname}-core
|
||||||
|
%doc python3/README.rst python3/CHANGES.rst
|
||||||
|
%license python3/LICENSE
|
||||||
|
%dir %{python3_sitelib}/%{pkgname}/
|
||||||
|
%dir %{python3_sitelib}/%{pkgname}/image
|
||||||
|
%dir %{python3_sitelib}/%{pkgname}/image/__pycache__
|
||||||
|
%{python3_sitelib}/%{pkgname}*.egg-info
|
||||||
|
%{python3_sitelib}/%{pkgname}/*.py*
|
||||||
|
%{python3_sitelib}/%{pkgname}/__pycache__
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/__init__.py*
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/base.py*
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/__pycache__/__init__.*
|
||||||
|
%{python3_sitelib}/%{pkgname}/image/__pycache__/base.*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 10 2015 Miro Hrončok <mhroncok@redhat.com> - 5.1-1
|
||||||
|
- Update to 5.1
|
||||||
|
- Introduce python3 subpackages (#1237118)
|
||||||
|
- Moved LICENSE from %%doc to %%license
|
||||||
|
|
||||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.1-3
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.1-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user