Build a python3 subpackage (bz 982759).

This commit is contained in:
Jerry James 2013-10-18 15:25:49 -06:00
parent 1f8e051a12
commit 35262a6d68
4 changed files with 1116 additions and 699 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/sympy-0.7.3.tar.gz /sympy-0.7.3.tar.gz
/sympy-0.7.3-py3.3.tar.gz

View File

@ -1 +1,2 @@
91e3dc58c0af063bc64b17674296cb35 sympy-0.7.3.tar.gz 91e3dc58c0af063bc64b17674296cb35 sympy-0.7.3.tar.gz
c6343a8eb1ab9a9741b3a3bba02a0eeb sympy-0.7.3-py3.3.tar.gz

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,11 @@
Name: sympy Name: sympy
Version: 0.7.3 Version: 0.7.3
Release: 1%{?dist} Release: 2%{?dist}
Summary: A Python library for symbolic mathematics Summary: A Python library for symbolic mathematics
License: BSD License: BSD
URL: http://sympy.org/ URL: http://sympy.org/
Source0: https://github.com/%{name}/%{name}/releases/download/%{name}-%{veresion}/%{name}-%{version}.tar.gz Source0: https://github.com/%{name}/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/%{name}/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}-py3.3.tar.gz
# Upstream tried to graft in another project as a private copy; we rip # Upstream tried to graft in another project as a private copy; we rip
# it out (rhbz# 551576): # it out (rhbz# 551576):
Patch0: %{name}-0.7.3-strip-internal-mpmath.patch Patch0: %{name}-0.7.3-strip-internal-mpmath.patch
@ -12,9 +13,9 @@ BuildArch: noarch
BuildRequires: gettext BuildRequires: gettext
BuildRequires: graphviz BuildRequires: graphviz
BuildRequires: numpy BuildRequires: numpy python3-numpy
BuildRequires: python2-devel BuildRequires: python2-devel python3-devel
BuildRequires: python-mpmath BuildRequires: python-mpmath python3-mpmath
BuildRequires: python-sphinx BuildRequires: python-sphinx
BuildRequires: tex(latex) BuildRequires: tex(latex)
BuildRequires: tex-dvipng BuildRequires: tex-dvipng
@ -29,6 +30,18 @@ while keeping the code as simple as possible in order to be
comprehensible and easily extensible. SymPy is written entirely in comprehensible and easily extensible. SymPy is written entirely in
Python and does not require any external libraries. Python and does not require any external libraries.
%package -n python3-%{name}
Summary: A Python3 library for symbolic mathematics
Requires: python3-matplotlib
Requires: python3-mpmath
Requires: python3-pyglet
%description -n python3-%{name}
SymPy aims to become a full-featured computer algebra system (CAS)
while keeping the code as simple as possible in order to be
comprehensible and easily extensible. SymPy is written entirely in
Python and does not require any external libraries.
%package texmacs %package texmacs
Summary: TeXmacs integration for sympy Summary: TeXmacs integration for sympy
Requires: %{name} = %{version}-%{release}, TeXmacs Requires: %{name} = %{version}-%{release}, TeXmacs
@ -52,26 +65,48 @@ HTML documentation for sympy.
%prep %prep
%setup -q %setup -q
%setup -q -T -D -a 1
%patch0 -b .mpmath %patch0 -b .mpmath
rm -rf sympy/mpmath doc/src/modules/mpmath rm -rf sympy/mpmath doc/src/modules/mpmath
rm -rf %{name}-%{version}/sympy/mpmath %{name}-%{version}/doc/src/module/mpmath
# Help the dependency generator
sed 's/env python/python2/' bin/isympy > bin/isympy.new
touch -r bin/isympy bin/isympy.new
mv -f bin/isympy.new bin/isympy
sed 's/env //' %{name}-%{version}/bin/isympy > isympy.new
touch -r %{name}-%{version}/bin/isympy isympy.new
mv -f isympy.new %{name}-%{version}/bin/isympy
%build %build
# Build the project # Build the python2 version
python setup.py build python2 setup.py build
# Build the python3 version
cd %{name}-%{version}
python3 setup.py build
# Build the documentation # Build the documentation
cd doc cd ../doc
make html make html
make cheatsheet make cheatsheet
cd ../%{name}-%{version}/doc
make cheatsheet
%install %install
# Install the main project # Install the python3 version
python setup.py install -O1 --skip-build --root %{buildroot} cd %{name}-%{version}
python3 setup.py install -O1 --skip-build --root %{buildroot}
mv %{buildroot}%{_bindir}/isympy %{buildroot}%{_bindir}/isympy3
cd ..
# Remove extra files # Install the python2 version
python2 setup.py install -O1 --skip-build --root %{buildroot}
## Remove extra files
rm -f %{buildroot}%{_bindir}/{,doc}test rm -f %{buildroot}%{_bindir}/{,doc}test
# Install the TeXmacs integration ## Install the TeXmacs integration
cp -p data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir} cp -p data/TeXmacs/bin/tm_sympy %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/TeXmacs/plugins/sympy mkdir -p %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
cp -a data/TeXmacs/progs %{buildroot}%{_datadir}/TeXmacs/plugins/sympy cp -a data/TeXmacs/progs %{buildroot}%{_datadir}/TeXmacs/plugins/sympy
@ -86,15 +121,27 @@ rm -f %{buildroot}%{_docdir}/%{name}-doc/html/.buildinfo
rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n rm -fr %{buildroot}%{_docdir}/%{name}-doc/i18n
%check %check
python setup.py test # The python3 tests fail with Unicode errors without this
export LC_ALL=en_US.UTF-8
python2 setup.py test
cd %{name}-%{version}
python3 setup.py test
%files %files
%doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf %doc AUTHORS LICENSE PKG-INFO doc/_build/cheatsheet/cheatsheet.pdf
%{python_sitelib}/sympy/ %{python2_sitelib}/sympy/
%{python_sitelib}/sympy-%{version}-*.egg-info %{python2_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/isympy %{_bindir}/isympy
%{_mandir}/man1/isympy.1* %{_mandir}/man1/isympy.1*
%files -n python3-%{name}
%doc %{name}-%{version}/AUTHORS %{name}-%{version}/LICENSE
%doc %{name}-%{version}/PKG-INFO
%doc %{name}-%{version}/doc/_build/cheatsheet/cheatsheet.pdf
%{python3_sitelib}/sympy/
%{python3_sitelib}/sympy-%{version}-*.egg-info
%{_bindir}/isympy3
%files texmacs %files texmacs
%doc data/TeXmacs/LICENSE %doc data/TeXmacs/LICENSE
%{_bindir}/tm_sympy %{_bindir}/tm_sympy
@ -108,6 +155,9 @@ python setup.py test
%{_docdir}/%{name}-doc/html %{_docdir}/%{name}-doc/html
%changelog %changelog
* Fri Oct 18 2013 Jerry James <loganjerry@gmail.com> - 0.7.3-2
- Build a python3 subpackage (bz 982759)
* Fri Aug 2 2013 Jerry James <loganjerry@gmail.com> - 0.7.3-1 * Fri Aug 2 2013 Jerry James <loganjerry@gmail.com> - 0.7.3-1
- Update to 0.7.3 - Update to 0.7.3
- Upstream dropped all tutorial translations - Upstream dropped all tutorial translations