]> git.pld-linux.org Git - packages/python-py.git/blobdiff - python-py.spec
- release 3 (by relup.sh)
[packages/python-py.git] / python-py.spec
index 599317c9a4dcc4b0596bf7b56a2e63ec54a71020..00e7c75c128a589e5f09b480521d46e54a9ac0be 100644 (file)
@@ -1,32 +1,36 @@
 #
 # Conditional build:
 %bcond_without doc     # HTML documentation build
+%bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
 %define                module  py
 Summary:       Library with cross-python path, ini-parsing, io, code, log facilities
 Summary(pl.UTF-8):     Biblioteka wspierająca obsługę ścieżek, ini, we/wy, kodowania i logowania w wielu Pythonach
 Name:          python-%{module}
-Version:       1.4.13
-Release:       2
+Version:       1.4.28
+Release:       3
 License:       MIT
 Group:         Development/Languages/Python
-Source0:       http://pypi.python.org/packages/source/p/py/py-%{version}.tar.gz
-# Source0-md5: 3857dc8309d5f284669b81184253c2bb
+Source0:       https://pypi.python.org/packages/source/p/py/py-%{version}.tar.gz
+# Source0-md5: 30b807e1fe1b886578c47337d424a083
 Source1:       http://docs.python.org/objects.inv?/python-objects.inv
 # Source1-md5: 3d3c0b594b2e91d559418c107d973633
 Patch0:                %{name}-offline.patch
-URL:           http://pylib.org/
+URL:           https://pypi.python.org/pypi/py
+%if %{with python2}
 BuildRequires: python-devel >= 1:2.5
+BuildRequires: python-setuptools >= 7.0
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools >= 7.0
+%endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
 %{?with_doc:BuildRequires:     sphinx-pdg >= 1.0}
 %{?with_doc:BuildRequires:     python-devel-tools}
-%if %{with python3}
-BuildRequires: python3-devel
-BuildRequires: python3-modules
-BuildRequires: python3-distribute
-%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -73,11 +77,14 @@ Pythonie. Zawiera następujące narzędzia i moduły:
 cp -p %{SOURCE1} doc
 
 %build
-%{__python} setup.py build
+%if %{with python2}
+%py_build \
+       --build-base build-2
+%endif
 
 %if %{with python3}
-%{__python3} setup.py \
-       build -b build-3
+%py3_build \
+       --build-base build-3
 %endif
 
 %if %{with doc}
@@ -87,15 +94,16 @@ PYTHONPATH=$(pwd) \
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
-       --root=$RPM_BUILD_ROOT \
-       --optimize=2
+
+%if %{with python2}
+%py_install
 
 %py_postclean
+%endif
 
 %if %{with python3}
 %{__python3} -- setup.py \
-       build -b build-3 \
+       build --build-base build-3 \
        install \
        --root=$RPM_BUILD_ROOT \
        --optimize=2
@@ -106,11 +114,13 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc CHANGELOG LICENSE README.txt %{?with_doc:doc/_build/html}
 %{py_sitescriptdir}/%{module}
 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
 
 %if %{with python3}
 %files -n python3-py
This page took 0.094404 seconds and 4 git commands to generate.