]> git.pld-linux.org Git - packages/python-py.git/commitdiff
up to 1.4.13; add python3 package
authorElan Ruusamäe <glen@delfi.ee>
Sat, 16 Mar 2013 23:43:08 +0000 (01:43 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 16 Mar 2013 23:43:08 +0000 (01:43 +0200)
python-py.spec

index 73a1adb6e53aecc0559bc53e47f2c7c6690488e5..3f21474ab6e88b59c95581163fe99475570d869d 100644 (file)
@@ -1,34 +1,39 @@
 #
 # Conditional build:
 %bcond_without doc     # HTML documentation build
-#
+%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
+Version:       1.4.13
 Release:       1
 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:       http://pypi.python.org/packages/source/p/py/py-%{version}.tar.gz
+# Source0-md5: 3857dc8309d5f284669b81184253c2bb
+Source1:       http://docs.python.org/objects.inv?/python-objects.inv
+# Source1-md5: 3d3c0b594b2e91d559418c107d973633
 Patch0:                %{name}-offline.patch
 URL:           http://pylib.org/
 BuildRequires: python-devel >= 1:2.5
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
 %{?with_doc:BuildRequires:     sphinx-pdg >= 1.0}
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-modules
+BuildRequires: python3-setuptools
+%endif
 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,15 +44,41 @@ 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
+Group:         Development/Languages/Python
+Requires:      python3-setuptools
+
+%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
+- py.path: uniform local and svn path objects
+
 %prep
 %setup -q -n %{module}-%{version}
 %patch0 -p1
 
+%if %{with python3a}
+rm -rf build-3
+set -- *
+install -d build-3
+cp -a "$@" build-3
+%endif
+
 cp -p %{SOURCE1} doc
 
 %build
 %{__python} setup.py build
 
+%if %{with python3}
+%{__python3} setup.py \
+       build -b build-3
+%endif
+
 %if %{with doc}
 PYTHONPATH=$(pwd) \
 %{__make} -C doc html
@@ -55,18 +86,35 @@ PYTHONPATH=$(pwd) \
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__python} setup.py install \
        --root=$RPM_BUILD_ROOT \
        --optimize=2
 
 %py_postclean
 
+%if %{with python3}
+%{__python3} -- setup.py \
+       build -b build-3 \
+       install \
+       --root=$RPM_BUILD_ROOT \
+       --optimize=2
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/py/test.py
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %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
+
+%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.125678 seconds and 4 git commands to generate.