[Git][debian-gis-team/pyepr][master] 5 commits: New upstream version 1.1.3

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sat Nov 27 13:30:57 GMT 2021



Antonio Valentino pushed to branch master at Debian GIS Project / pyepr


Commits:
0ea34a1e by Antonio Valentino at 2021-11-27T13:23:37+00:00
New upstream version 1.1.3
- - - - -
826d28f9 by Antonio Valentino at 2021-11-27T13:23:39+00:00
Update upstream source from tag 'upstream/1.1.3'

Update to upstream version '1.1.3'
with Debian dir 9bd9262a8b5404de344b391de9d94e3574f900fc
- - - - -
b01295a6 by Antonio Valentino at 2021-11-27T13:24:17+00:00
New upstream release

- - - - -
19812a57 by Antonio Valentino at 2021-11-27T13:25:43+00:00
Refresh all patches

- - - - -
192b5080 by Antonio Valentino at 2021-11-27T13:26:24+00:00
Set distribution to unstable

- - - - -


17 changed files:

- .github/workflows/python-package.yml
- .github/workflows/wheels.yml
- MANIFEST.in
- Makefile
- README.rst
- debian/changelog
- debian/patches/0001-Only-use-local-files-for-generating-sphinx-doc.patch
- doc/NEWS.rst
- doc/conf.py
- doc/index.rst
- doc/usermanual.rst
- pyproject.toml
- requirements-dev.txt
- setup.cfg
- setup.py
- src/epr.pyx
- tests/test_all.py


Changes:

=====================================
.github/workflows/python-package.yml
=====================================
@@ -18,7 +18,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-latest, macos-latest, windows-latest]
-        python-version: [3.7, 3.8, 3.9]
+        python-version: ['3.7', '3.8', '3.9', '3.10']
         include:
           - os: ubuntu-latest
             python-version: pypy3
@@ -35,12 +35,9 @@ jobs:
     - name: Install dependencies
       run: |
         python -m pip install --upgrade setuptools pip wheel
-        python -m pip install sphinx coverage codecov
-        python -m pip install -r requirements-dev.txt
+        python -m pip install sphinx coverage codecov pytest
     - name: Build and install
       run: |
-        # python setup.py sdist
-        # python -m pip install dist/pyepr-*.tar.gz
         python -m pip install .
     - name: Test with pytest
       run: |
@@ -75,11 +72,10 @@ jobs:
       run: |
         sudo apt-get -y install libepr-api-dev
         python -m pip install --upgrade setuptools pip wheel
-        python -m pip install sphinx coverage codecov
-        python -m pip install -r requirements-dev.txt
+        python -m pip install sphinx coverage codecov pytest
     - name: Build and install
       run: |
-        python setup.py install --epr-api-src=""
+        python -m pip install --install-option='--epr-api-src=""' .
     - name: Test with pytest
       run: |
         python -c "\


=====================================
.github/workflows/wheels.yml
=====================================
@@ -5,6 +5,7 @@ on:
     branches:
       - 'releases/**'
     tags:
+      - v*
 
 jobs:
   build_wheels:
@@ -24,7 +25,7 @@ jobs:
       - uses: actions/setup-python at v2
 
       - name: Install cibuildwheel
-        run: python -m pip install cibuildwheel==2.0.1
+        run: python -m pip install cibuildwheel
 
       - name: Build wheels
         run: python -m cibuildwheel --output-dir wheelhouse


=====================================
MANIFEST.in
=====================================
@@ -1,6 +1,7 @@
 recursive-include LICENSES *.txt
 recursive-include tests *.py
-recursive-include src *.pyx *.pxd *.c
+recursive-include src *.pyx *.pxd
+# recursive-include src *.c
 recursive-include extern/epr-api/src *.c *.h
 exclude extern/epr-api/*
 recursive-exclude extern/epr-api/src/api-test *


=====================================
Makefile
=====================================
@@ -32,15 +32,15 @@ EPRAPIROOT = extern/epr-api
 default: ext
 
 ext: src/epr.pyx
-	$(PYTHON) setup.py build_ext --inplace
+	$(PYTHON) setup.py build_ext --inplace --epr-api-src=$(EPRAPIROOT)/src
 
 cythonize: src/epr.c
 
 src/epr.c: src/epr.pyx
 	$(CYTHON) $(CYTHONFLAGS) src/epr.pyx
 
-sdist: doc cythonize
-	$(PYTHON) setup.py sdist
+sdist: doc
+	$(PYTHON) -m build --sdist
 
 LICENSES/epr-api.txt:
 	mkdir LICENSES
@@ -48,8 +48,8 @@ LICENSES/epr-api.txt:
 
 eprsrc: LICENSES/epr-api.txt
 
-fullsdist: doc cythonize eprsrc
-	$(PYTHON) setup.py sdist
+fullsdist: doc eprsrc
+	$(PYTHON) -m build --sdist
 
 upload: fullsdist
 	twine check dist/pyepr-*.tar.gz


=====================================
README.rst
=====================================
@@ -6,7 +6,7 @@ ENVISAT Product Reader Python API
 :Author:    Antonio Valentino
 :Contact:   antonio.valentino at tiscali.it
 :Copyright: 2011-2021, Antonio Valentino <antonio.valentino at tiscali.it>
-:Version:   1.1.0
+:Version:   1.1.3
 
 .. image:: https://github.com/avalentino/pyepr/actions/workflows/python-package.yml/badge.svg?branch=master
     :alt: CI status page


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+pyepr (1.1.3-1) unstable; urgency=medium
+
+  * New upstream version.
+  * Refresh all patches.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 27 Nov 2021 13:25:59 +0000
+
 pyepr (1.1.1-2) unstable; urgency=medium
 
   [ Bas Couwenberg ]


=====================================
debian/patches/0001-Only-use-local-files-for-generating-sphinx-doc.patch
=====================================
@@ -11,10 +11,10 @@ happens any longer (Closes: #726859).
  1 file changed, 9 insertions(+), 7 deletions(-)
 
 diff --git a/doc/conf.py b/doc/conf.py
-index 882bcf1..3ed52b9 100644
+index 2ac4e1e..06e1b7e 100644
 --- a/doc/conf.py
 +++ b/doc/conf.py
-@@ -136,11 +136,11 @@ html_sidebars = {
+@@ -134,11 +134,11 @@ html_sidebars = {
          'relations.html',
          'sourcelink.html',
          'searchbox.html',
@@ -31,7 +31,7 @@ index 882bcf1..3ed52b9 100644
      ],
  }
  
-@@ -215,8 +215,10 @@ epub_exclude_files = ['search.html']
+@@ -213,8 +213,10 @@ epub_exclude_files = ['search.html']
  
  # Example configuration for intersphinx: refer to the Python standard library.
  intersphinx_mapping = {


=====================================
doc/NEWS.rst
=====================================
@@ -1,10 +1,26 @@
 Change history
 ==============
 
+PyEPR 1.1.3 (13/09/2021)
+------------------------
+
+* Do not use the deprecated distutils package.
+* Improve command line arguments management in ``setup.py``.
+* Stop distributing .c code auto-generated by Cython_ in the source tarball.
+  Now the .c code is generated by Cython_ during the build package phase.
+
+
+PyEPR 1.1.2 (06/11/2021)
+------------------------
+
+* Enable CI testing with Python 3.10.
+* Update the internal copu of EPR C API to v2.3dev_pyerp112.
+
+
 PyEPR 1.1.1 (07/08/2021)
 ------------------------
 
-* Fix a setious issue in sdist generation.
+* Fix a serious issue in sdist generation.
 
 
 PyEPR 1.1.0 (06/08/2021)


=====================================
doc/conf.py
=====================================
@@ -20,9 +20,10 @@ project = 'PyEPR'
 copyright = '2011-2021, Antonio Valentino'
 author = 'Antonio Valentino'
 
-def get_version(filename, strip_extra=False):
+
+def get_version(filename):
     import re
-    from distutils.version import LooseVersion
+    from packaging.version import parse as Version
 
     with open(filename) as fd:
         data = fd.read()
@@ -30,18 +31,15 @@ def get_version(filename, strip_extra=False):
     mobj = re.search(
         r'''^__version__\s*=\s*(?P<quote>['"])(?P<version>.*)(?P=quote)''',
         data, re.MULTILINE)
-    version = LooseVersion(mobj.group('version'))
+    return Version(mobj.group('version'))
 
-    if strip_extra:
-        return '.'.join(map(str, version.version[:3]))
-    else:
-        return version.vstring
+_version = get_version('../src/epr.pyx')
 
 # The short X.Y version.
-version = get_version('../src/epr.pyx', strip_extra=True)
+version = _version.base_version
 
 # The full version, including alpha/beta/rc tags.
-release = get_version('../src/epr.pyx', strip_extra=False)
+release = str(_version)
 
 # -- General configuration ---------------------------------------------------
 


=====================================
doc/index.rst
=====================================
@@ -60,7 +60,9 @@ ENVISAT Product Reader Python API
     Online documentation for other PyEpr_ versions:
 
     * `latest <https://pyepr.readthedocs.io/en/latest/>`_ development
-    * `1.1.1 <https://pyepr.readthedocs.io/en/v1.1.1/>`_ (latest stable)
+    * `1.1.3 <https://pyepr.readthedocs.io/en/v1.1.3/>`_ (latest stable)
+    * `1.1.2 <https://pyepr.readthedocs.io/en/v1.1.2/>`_
+    * `1.1.1 <https://pyepr.readthedocs.io/en/v1.1.1/>`_
     * `1.1.0 <https://pyepr.readthedocs.io/en/v1.1.0/>`_
     * `1.0.1 <https://pyepr.readthedocs.io/en/v1.0.1/>`_
     * `1.0.0 <https://pyepr.readthedocs.io/en/v1.0.0/>`_


=====================================
doc/usermanual.rst
=====================================
@@ -67,7 +67,7 @@ correctly installed and configured:
 * `EPR API`_ >= 2.2 (optional, since PyEPR 0.7 the source tar-ball comes
   with a copy of the EPR C API sources)
 * a reasonably updated C compiler [#]_ (build only)
-* Cython_ >= 0.29 [#]_ (optional and build only)
+* Cython_ >= 0.29.22 [#]_ (build only)
 * pytest_ (optional and only needed for testing)
 
 
@@ -156,7 +156,7 @@ the :envvar:`PYTHONPATH`.
 
 PyEPR_ can be installed from sources using the following command::
 
-    $ python3 setup.py install
+    $ python3 -m pip install .
 
 The :file:`setup.py` script by default checks for the availability of the
 EPR C API source code in the :file:`<package-root>/epr-api-src` directory
@@ -180,6 +180,11 @@ with the system `EPR API`_ C library::
 
     $ python3 setup.py install --epr-api-src=""
 
+Please note that if the ``setup.py`` script is invoked directly, then the
+user must make sure that setup requirements are propely installed::
+
+    $ python3 -m pip install cython numpy
+
 .. _pip: https://pypi.org/project/pip
 
 


=====================================
pyproject.toml
=====================================
@@ -3,7 +3,8 @@
 requires = [
     "setuptools >= 40.8.0",
     "wheel",
-    "cython >= 0.29",
+    "packaging",
+    "cython >= 0.29.22",
     "oldest-supported-numpy",
 ]
 build-backend = "setuptools.build_meta"


=====================================
requirements-dev.txt
=====================================
@@ -1,5 +1,6 @@
 numpy>=1.7
-cython>=0.29
+cython>=0.29.22
 sphinx
 pytest
 coverage
+docutils<0.18


=====================================
setup.cfg
=====================================
@@ -40,6 +40,7 @@ classifiers =
     Programming Language :: Python :: 3.7
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9
+    Programming Language :: Python :: 3.10
     Programming Language :: Python :: Implementation :: CPython
     Programming Language :: Python :: Implementation :: PyPy
     Programming Language :: Cython
@@ -54,7 +55,6 @@ project_urls =
     Tracker = https://github.com/avalentino/pyepr/issues
 
 [options]
-setup_requires = numpy>=1.7
 install_requires = numpy>=1.7
 python_requires = >=3.5, <4
 zip_safe = False


=====================================
setup.py
=====================================
@@ -32,7 +32,7 @@ except ImportError:
 
 def get_version(filename, strip_extra=False):
     import re
-    from distutils.version import LooseVersion
+    from packaging.version import parse as Version
 
     with open(filename) as fd:
         data = fd.read()
@@ -40,12 +40,7 @@ def get_version(filename, strip_extra=False):
     mobj = re.search(
         r'''^__version__\s*=\s*(?P<quote>['"])(?P<version>.*)(?P=quote)''',
         data, re.MULTILINE)
-    version = LooseVersion(mobj.group('version'))
-
-    if strip_extra:
-        return '.'.join(map(str, version.version[:3]))
-    else:
-        return version.vstring
+    return Version(mobj.group('version'))
 
 
 # https://mail.python.org/pipermail/distutils-sig/2007-September/008253.html
@@ -100,17 +95,11 @@ def setup_extension(eprsrcdir=None, coverage=False):
     return ext
 
 
-BASE_CONFIG = dict(
-    version=get_version(os.path.join('src', 'epr.pyx')),
-)
-
-
 def make_config(eprsrcdir=None, coverage=False):
-    config = BASE_CONFIG.copy()
-    config['version'] = get_version(os.path.join('src', 'epr.pyx'))
-    config['ext_modules'] = [setup_extension(eprsrcdir, coverage)]
-    if not os.path.exists(os.path.join('src', 'epr.c')):
-        config.setdefault('setup_requires', []).append('cython>=0.29')
+    config = {
+        'version': str(get_version(os.path.join('src', 'epr.pyx'))),
+        'ext_modules': [setup_extension(eprsrcdir, coverage)],
+    }
 
     return config
 
@@ -125,7 +114,7 @@ def get_parser():
     DEFAULT_EPRAPI_SRC = os.environ.get('PYEPR_EPRAPI_SRC', DEFAULT_EPRAPI_SRC)
 
     import argparse
-    parser = argparse.ArgumentParser()
+    parser = argparse.ArgumentParser(add_help=False)
     parser.add_argument(
         '--coverage', action='store_true', default=DEFAULT_COVERAGE)
     parser.add_argument('--epr-api-src', default=DEFAULT_EPRAPI_SRC)
@@ -140,4 +129,11 @@ if __name__ == '__main__':
     print('PYEPR_COVERAGE:', extra_args.coverage)
 
     config = make_config(extra_args.epr_api_src, extra_args.coverage)
+
+    if '-h' in setup_argv or '--help' in setup_argv:
+        msg = parser.format_help()
+        msg = '\n'.join(msg.splitlines()[2:])  # remove usage string
+        print(msg)
+        print()
+
     setuptools.setup(**config)


=====================================
src/epr.pyx
=====================================
@@ -40,7 +40,7 @@ in a product file.
 .. _ESA: http://earth.esa.int
 """
 
-__version__ = '1.1.1'
+__version__ = '1.1.3'
 
 from libc cimport errno
 from libc cimport stdio


=====================================
tests/test_all.py
=====================================
@@ -31,7 +31,7 @@ import tempfile
 import unittest
 import functools
 from urllib.request import urlopen
-from distutils.version import LooseVersion
+from packaging.version import parse as Version
 
 try:
     import resource
@@ -62,11 +62,14 @@ EPR_TO_NUMPY_TYPE = {
 
 
 def has_epr_c_bug_pyepr009():
-    v = LooseVersion(epr.EPR_C_API_VERSION)
-    if 'pyepr' in v.version:
-        return v < LooseVersion('2.3dev_pyepr082')
+    v = Version(epr.EPR_C_API_VERSION)
+    if '_pyepr' in str(v):
+        epr_version, _, pyepr_version = str(v).partition('_pyepr')
+        v = Version(epr_version), Version(pyepr_version)
+        v_ref = Version('2.3dev'), Version('082')
+        return v < v_ref
     else:
-        return v <= LooseVersion('2.3')
+        return v <= Version('2.3')
 
 
 EPR_C_BUG_PYEPR009 = has_epr_c_bug_pyepr009()



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyepr/-/compare/c122fe81f9f3415bece61017aa4c076aadb05b14...192b5080ce08fa95f576250ffd4a4c9efbf4e320

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyepr/-/compare/c122fe81f9f3415bece61017aa4c076aadb05b14...192b5080ce08fa95f576250ffd4a4c9efbf4e320
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20211127/b11f9f6f/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list