[python-cclib] Added python3 package
nonamedotc
nonamedotc at fedoraproject.org
Sun Jul 13 23:02:46 UTC 2014
commit 40108d7dee592e3112e251d597a8de7a515047a4
Author: nonamedotc <nonamedotc at fedoraproject.org>
Date: Sun Jul 13 18:03:06 2014 -0500
Added python3 package
python-cclib.spec | 53 +++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 45 insertions(+), 8 deletions(-)
---
diff --git a/python-cclib.spec b/python-cclib.spec
index d8ad1a9..98c13b1 100644
--- a/python-cclib.spec
+++ b/python-cclib.spec
@@ -2,9 +2,9 @@
%global oname cclib
-Name: python-cclib
+Name: python-%{oname}
Version: 1.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A library for processing results of computational chemistry packages
Group: Development/Languages
License: LGPLv2+
@@ -14,8 +14,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
+BuildRequires: python3-devel
# For test phase
BuildRequires: numpy
+BuildRequires: python3-numpy
# Needed for operation
Requires: numpy
# Extra stuff
@@ -28,6 +30,18 @@ interpreting the results of computational chemistry packages. The current
version, cclib 0.9, parses output files from ADF, GAMESS (US), GAMESS-UK,
Gaussian, Jaguar, Molpro, ORCA and PC GAMESS.
+%package -n python3-%{oname}
+Summary: %{summary}
+Requires: python3-numpy
+
+%description -n python3-%{oname}
+cclib is an open source library, written in Python, for parsing and
+interpreting the results of computational chemistry packages. The current
+version, cclib 0.9, parses output files from ADF, GAMESS (US), GAMESS-UK,
+Gaussian, Jaguar, Molpro, ORCA and PC GAMESS.
+
+This is the python3 version of the library.
+
%prep
%setup -q -c -n %{oname}-%{version} -T
tar zxf %{SOURCE0}
@@ -53,22 +67,35 @@ done
sed -i '1 i\# -*- coding: utf-8 -*-' src/cclib/parser/data.py
sed -i '1 i\# -*- coding: utf-8 -*-' src/cclib/parser/orcaparser.py
+# preparation for python3
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+
%build
-python setup.py build
+%{__python2} setup.py build
+
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
%install
-rm -rf $RPM_BUILD_ROOT
python setup.py install -O1 --skip-build --root %{buildroot}
-
-%clean
-rm -rf %{buildroot}
+# python3 installation
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
# Test phase needs installed python-cclib
%check
-cd test
+pushd test
PYTHONPATH=../build/lib python testall.py
+popd
+# test using python3
+pushd test
+PYTHONPATH=../build/lib python3 testall.py
+popd
%files
%defattr(-,root,root,-)
@@ -78,7 +105,17 @@ PYTHONPATH=../build/lib python testall.py
%{_bindir}/ccget
%{_bindir}/cda
+%files -n python3-%{oname}
+%doc ANNOUNCE CHANGELOG LICENSE README THANKS
+%{python3_sitelib}/%{oname}/
+%{python3_sitelib}/%{oname}-*.egg-info
+%{_bindir}/ccget
+%{_bindir}/cda
+
%changelog
+* Sun Jul 13 2014 Mukundan Ragavan <nonamedotc at gmail.com> - 1.2-2
+- Added python3 package
+
* Fri Jun 13 2014 Mukundan Ragavan <nonamedotc at fedoraproject.org> - 1.2-1
- Updated to 1.2
- Changed URL and Source0 to github links
More information about the scm-commits
mailing list