]> 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 73a1adb6e53aecc0559bc53e47f2c7c6690488e5..00e7c75c128a589e5f09b480521d46e54a9ac0be 100644 (file)
@@ -1,34 +1,44 @@
 #
 # 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.9
-Release:       1
+Version:       1.4.28
+Release:       3
 License:       MIT
 Group:         Development/Languages/Python
-Source0:       http://pypi.python.org/packages/source/p/py/%{module}-%{version}.zip
-# Source0-md5: 471a88edcdae2f9689c0193972a1a1f8
-Source1:       http://docs.python.org/objects.inv#/python-objects.inv
-# Source1-md5: 9128e774ec21dcd62dc5bca61cdd91ee
+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}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 The py lib is a Python development support library featuring the
 following tools and modules:
- - py.path:  uniform local and svn path objects
- - py.apipkg:  explicit API control and lazy-importing
- - py.iniconfig:  easy parsing of .ini files
+ - py.path: uniform local and svn path objects
+ - py.apipkg: explicit API control and lazy-importing
+ - py.iniconfig: easy parsing of .ini files
  - py.code: dynamic code generation and introspection
 
 %description -l pl.UTF-8
@@ -39,6 +49,27 @@ Pythonie. Zawiera następujące narzędzia i moduły:
  - py.iniconfig - łatwa analiza plików .ini
  - py.code - dynamiczne generowanie kodu i introspekcji
 
+%package -n python3-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
+Group:         Development/Languages/Python
+
+%description -n python3-py
+The py lib is a Python development support library featuring the
+following tools and modules:
+- py.path: uniform local and svn path objects
+- py.apipkg: explicit API control and lazy-importing
+- py.iniconfig: easy parsing of .ini files
+- py.code: dynamic code generation and introspection
+
+%description -n python3-py -l pl.UTF-8
+Biblioteka py to biblioteka wpierająca tworzenie oprogramowania w
+Pythonie. Zawiera następujące narzędzia i moduły:
+ - py.path - jednolite obiekty ścieżek lokalnych i svn
+ - py.apipkg - bezpośrednia kontrola API i leniwego importowania
+ - py.iniconfig - łatwa analiza plików .ini
+ - py.code - dynamiczne generowanie kodu i introspekcji
+
 %prep
 %setup -q -n %{module}-%{version}
 %patch0 -p1
@@ -46,7 +77,15 @@ 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}
+%py3_build \
+       --build-base build-3
+%endif
 
 %if %{with doc}
 PYTHONPATH=$(pwd) \
@@ -56,17 +95,37 @@ PYTHONPATH=$(pwd) \
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__python} setup.py install \
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} -- setup.py \
+       build --build-base build-3 \
+       install \
        --root=$RPM_BUILD_ROOT \
        --optimize=2
 
-%py_postclean
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/py/test.py
+%endif
 
 %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}/py
-%{py_sitescriptdir}/py-%{version}-py*.egg-info
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-py
+%defattr(644,root,root,755)
+%doc CHANGELOG LICENSE README.txt %{?with_doc:doc/_build/html}
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
This page took 0.062181 seconds and 4 git commands to generate.