[python-logilab-astng] - Upstream v0.24.1 - Add python3-logilab-astng subpackage to spec. Not ready to turn it on yet due

Brian C. Lane bcl at fedoraproject.org
Fri Jan 11 18:14:06 UTC 2013


commit 30d93a5bd998aee4c6ee9df74b2448ed5237af36
Author: Brian C. Lane <bcl at redhat.com>
Date:   Fri Jan 11 10:13:57 2013 -0800

    - Upstream v0.24.1
    - Add python3-logilab-astng subpackage to spec. Not ready to turn it on yet
      due to this upstream bug: http://www.logilab.org/ticket/110213

 .gitignore                |    1 +
 python-logilab-astng.spec |   83 +++++++++++++++++++++++++++++++++++++++------
 sources                   |    2 +-
 3 files changed, 74 insertions(+), 12 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8ca5f6f..580cae0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ logilab-astng-0.20.1.tar.gz
 /logilab-astng-0.23.0.tar.gz
 /logilab-astng-0.23.1.tar.gz
 /logilab-astng-0.24.0.tar.gz
+/logilab-astng-0.24.1.tar.gz
diff --git a/python-logilab-astng.spec b/python-logilab-astng.spec
index 3732809..3549c2f 100644
--- a/python-logilab-astng.spec
+++ b/python-logilab-astng.spec
@@ -1,10 +1,13 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if 0%{?fedora} > 12
+%global with_python3 0
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
 
 Name:           python-logilab-astng
-Version:        0.24.0
+Version:        0.24.1
 Release:        1%{?dist}
 Summary:        Python Abstract Syntax Tree New Generation
-
 Group:          Development/Languages
 License:        GPLv2+
 URL:            http://www.logilab.org/projects/astng/
@@ -15,31 +18,71 @@ Provides:       python-astng = %{version}-%{release}
 Obsoletes:      python-astng <= 0.16.0
 
 BuildArch:      noarch
-BuildRequires:  python-devel python-setuptools python-unittest2
+BuildRequires:  python-devel python-setuptools
 BuildRequires:  python-logilab-common >= 0.56.0
 Requires:       python-logilab-common >= 0.56.0
+%if 0%{?with_python3}
+BuildRequires:  python3-devel python3-setuptools
+BuildRequires:  python3-logilab-common >= 0.56.0
+%endif # if with_python3
 
 %description
 The aim of this module is to provide a common base representation of
 python source code for projects such as pychecker, pyreverse,
-pylint, and others. It extends the class defined in the compiler.ast 
+pylint, and others. It extends the class defined in the compiler.ast
 python module with some additional methods and attributes.
 
+%if 0%{?with_python3}
+%package -n python3-logilab-astng
+Summary:        Python Abstract Syntax Tree New Generation
+Group:          Development/Languages
+Requires:       python3-logilab-common >= 0.56.0
+
+%description -n python3-logilab-astng
+The aim of this module is to provide a common base representation of
+python source code for projects such as pychecker, pyreverse,
+pylint, and others. It extends the class defined in the compiler.ast
+python module with some additional methods and attributes.
+%endif # if with_python3
 
 %prep
 %setup -q -n logilab-astng-%{version}
 
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif # with_python3
 
 %build
 %{__python} setup.py build
 
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-rm -rf $RPM_BUILD_ROOT%{python_sitelib}/logilab/astng/test
+rm -rf %{buildroot}
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+rm -rf %{buildroot}%{python3_sitelib}/logilab/astng/test
+# Provided by the python3-logilab-common package
+rm -f %{buildroot}%{python3_sitelib}/logilab/__init__.*
+# Fix encoding in readme
+for FILE in README; do
+    iconv -f iso-8859-15 -t utf-8 $FILE > $FILE.utf8
+    mv -f $FILE.utf8 $FILE
+done
+popd
+%endif # with_python3
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+rm -rf %{buildroot}%{python_sitelib}/logilab/astng/test
 # Provided by the python-logilab-common package
-rm -f $RPM_BUILD_ROOT%{python_sitelib}/logilab/__init__.*
+rm -f %{buildroot}%{python_sitelib}/logilab/__init__.*
 # Fix encoding in readme
 for FILE in README; do
     iconv -f iso-8859-15 -t utf-8 $FILE > $FILE.utf8
@@ -49,9 +92,14 @@ done
 %check
 %{__python} setup.py test
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif # with_python3
 
+%clean
+rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
@@ -60,8 +108,21 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitelib}/logilab_astng*.egg-info
 %{python_sitelib}/logilab_astng*.pth
 
+%if 0%{?with_python3}
+%files -n python3-logilab-astng
+%defattr(-,root,root,-)
+%doc README COPYING
+%{python3_sitelib}/logilab/astng
+%{python3_sitelib}/logilab_astng*.egg-info
+%{python3_sitelib}/logilab_astng*.pth
+%endif # with_python3
 
 %changelog
+* Thu Jan 10 2013 Brian C. Lane <bcl at redhat.com> 0.24.1-1
+- Upstream v0.24.1
+- Add python3-logilab-astng subpackage to spec. Not ready to turn it on yet
+  due to this upstream bug: http://www.logilab.org/ticket/110213
+
 * Fri Aug 03 2012 Brian C. Lane <bcl at redhat.com> 0.24.0-1
 - Upstream v0.24.0
 
diff --git a/sources b/sources
index 2d3ec28..4cf069d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9383047bfe2be4405af491fbe5c7f1c6  logilab-astng-0.24.0.tar.gz
+b9c80fe2da8c7bfcd684de1cd041ce6e  logilab-astng-0.24.1.tar.gz


More information about the scm-commits mailing list