diff --git a/.gitignore b/.gitignore index 4325608..47bafc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -/gmpy2-2.0.6.zip -/gmpy2-2.0.7.zip -/gmpy2-2.0.8.zip +/gmpy2-*.zip +/gmpy2-*.tar.gz diff --git a/gmpy2-import.patch b/gmpy2-import.patch new file mode 100644 index 0000000..994ba43 --- /dev/null +++ b/gmpy2-import.patch @@ -0,0 +1,14 @@ +# Fix import issues. See git commit cb0d591e8bffd7833db8c26fed81f43952732c0d. +--- gmpy2/__init__.pxd.orig 2018-05-18 11:28:00.000000000 -0600 ++++ gmpy2/__init__.pxd 2018-05-18 11:33:32.444069344 -0600 +@@ -1 +1 @@ +-from gmpy2 cimport * ++from gmpy2.gmpy2 cimport * +--- gmpy2/__init__.py.orig 2018-05-18 11:28:00.000000000 -0600 ++++ gmpy2/__init__.py 2018-05-18 11:34:01.852674784 -0600 +@@ -1 +1,5 @@ + from .gmpy2 import * ++# Internal variables/functions are not imported by * above. ++# These are used by some python level functions and are needed ++# at the top level. ++from .gmpy2 import _C_API, _mpmath_normalize, _mpmath_create diff --git a/python-gmpy2.spec b/python-gmpy2.spec index e5d5623..b7f3502 100644 --- a/python-gmpy2.spec +++ b/python-gmpy2.spec @@ -5,26 +5,29 @@ %global srcname gmpy2 Name: python-%{srcname} -Version: 2.0.8 -Release: 7%{?dist} +Version: 2.1.0 +Release: 0.1.a2%{?dist} Summary: Python interface to GMP, MPFR, and MPC -# All source files are LGPLv3+ except: -# - src/py3intcompat.c is Python -# - src/mpz_pylong.c is LGPLv2+ -License: LGPLv3+ and Python +License: LGPLv3+ URL: https://pypi.python.org/pypi/gmpy2 -Source0: https://files.pythonhosted.org/packages/source/g/%{srcname}/%{srcname}-%{version}.zip +Source0: https://github.com/aleaxit/gmpy/archive/%{srcname}-%{version}.tar.gz +# Fix an import issue; git commit cb0d591 +Patch0: %{srcname}-import.patch BuildRequires: gcc BuildRequires: gmp-devel BuildRequires: libmpc-devel BuildRequires: mpfr-devel +BuildRequires: python2-Cython BuildRequires: python2-devel +BuildRequires: python2-setuptools BuildRequires: python2-sphinx %if 0%{?with_py3} +BuildRequires: python3-Cython BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: python3-sphinx %endif @@ -65,6 +68,7 @@ Provides: bundled(jquery) %setup -q -c pushd %{srcname}-%{version} +%patch0 # Fix file encodings. First the easy one. iconv -f ISO8859-1 -t UTF-8 src/gmpy2.c > src/gmpy2.c.utf8 @@ -79,7 +83,7 @@ popd %if 0%{?fedora} >= 24 # Update the sphinx theme name -sed -i 's/default/alabaster/' %{srcname}-%{version}/docs/conf.py +sed -i "s/'default'/'alabaster'/" %{srcname}-%{version}/docs/conf.py %endif %if 0%{?with_py3} @@ -89,11 +93,6 @@ sed -i 's/sphinx-build/&-3/' python3-%{srcname}-%{version}/docs/Makefile %endif %build -# Adapt to 64-bit systems -%if "%{_libdir}" == "%{_prefix}/lib64" -%global py_setup_args "--lib64" -%endif - # Python 2 build pushd %{srcname}-%{version} %py2_build @@ -112,14 +111,12 @@ popd # Python 2 install pushd %{srcname}-%{version} %py2_install -chmod 0755 %{buildroot}%{python2_sitearch}/*.so popd %if 0%{?with_py3} # Python 3 install pushd python3-%{srcname}-%{version} %py3_install -chmod 0755 %{buildroot}%{python3_sitearch}/*.so popd %endif @@ -149,6 +146,9 @@ popd %endif %changelog +* Sat Jun 2 2018 Jerry James - 2.1.0-0.1.a2 +- Update to alpha version for sagemath 8.2 + * Fri Feb 09 2018 Fedora Release Engineering - 2.0.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index ac6799a..067a383 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -56d40bddcf8f22be0a36d60f764f3241 gmpy2-2.0.8.zip +SHA512 (gmpy2-2.1.0a2.tar.gz) = bad44fb4aa23838e510167acce7c0d3d1eb01e178c99127941507b5b142a6a94308870f35cd0c6571de9428e945c62a25a9a705effb78933eb9b2e4d51490f50