This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository fiona.
commit 0aab76b04252fc566e767b203fb69a12469c2231 Author: Bas Couwenberg <[email protected]> Date: Wed Jun 15 17:51:05 2016 +0200 Imported Upstream version 1.7.0.post1 --- CHANGES.txt | 14 ++++++++++++-- fiona/__init__.py | 2 +- setup.py | 48 ++++++++++++++++++++---------------------------- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f9afad4..97f59a2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,11 @@ Changes All issue numbers are relative to https://github.com/Toblerity/Fiona/issues. +1.7.0post1 (2016-06-15) +----------------------- + +Packaging: No files are copied for the 'clean' setup target (#361, #362). + 1.7.0 (2016-06-14) ------------------ @@ -10,12 +15,17 @@ The C extension modules in this library can now be built and used with either a 1.x or 2.x release of the GDAL library. Big thanks to René Buffat for leading this effort. -- Refactoring: The `ogrext1.pyx` and `ogrext2.pyx` files now use separate +Refactoring: + +- The `ogrext1.pyx` and `ogrext2.pyx` files now use separate C APIs defined in `ogrext1.pxd` and `ogrex2.pxd`. The other extension modules have been refactored so that they do not depend on either of these modules and use subsets of the GDAL/OGR API compatible with both GDAL 1.x and 2.x (#359). -- Packaging: Source distributions now contain two different sources for the + +Packaging: + +- Source distributions now contain two different sources for the `ogrext` extension module. The `ogrext1.c` file will be used with GDAL 1.x and the `ogrext2.c` file will be used with GDAL 2.x. diff --git a/fiona/__init__.py b/fiona/__init__.py index e17a2d6..d15b2c0 100644 --- a/fiona/__init__.py +++ b/fiona/__init__.py @@ -81,7 +81,7 @@ import uuid __all__ = ['bounds', 'listlayers', 'open', 'prop_type', 'prop_width'] -__version__ = "1.7.0" +__version__ = "1.7.0.post1" __gdal_version__ = get_gdal_release_name().decode('utf-8') log = logging.getLogger('Fiona') diff --git a/setup.py b/setup.py index efee743..769b91e 100644 --- a/setup.py +++ b/setup.py @@ -74,33 +74,12 @@ with open('CHANGES.txt', **open_kwds) as f: # Set a flag for builds where the source directory is a repo checkout. source_is_repo = os.path.exists("MANIFEST.in") - -def copy_gdalapi_pyx(gdalversion): - if gdalversion[0] == u'1': - log.info("Building Fiona for gdal 1.x: {0}".format(gdalversion)) - shutil.copy('fiona/ogrext1.pyx', 'fiona/ogrext.pyx') - else: - log.info("Building Fiona for gdal 2.x: {0}".format(gdalversion)) - shutil.copy('fiona/ogrext2.pyx', 'fiona/ogrext.pyx') - - -def copy_gdalapi_c(gdalversion): - if gdalversion[0] == u'1': - log.info("Building Fiona for gdal 1.x: {0}".format(gdalversion)) - shutil.copy('fiona/ogrext1.c', 'fiona/ogrext.c') - print("Copied 'fiona/ogrext1.c' to'fiona/ogrext.c'") - else: - log.info("Building Fiona for gdal 2.x: {0}".format(gdalversion)) - shutil.copy('fiona/ogrext2.c', 'fiona/ogrext.c') - print("Copied 'fiona/ogrext2.c' to 'fiona/ogrext.c'") - - +# Get GDAL API version from the command line if specified there. if '--gdalversion' in sys.argv and 'clean' not in sys.argv: index = sys.argv.index('--gdalversion') sys.argv.pop(index) gdalversion = sys.argv.pop(index) - # Extend distutil's sdist command to generate C extension sources from # both `ogrext`.pyx` and `ogrext2.pyx` for GDAL 1.x and 2.x. class sdist_multi_gdal(sdist): @@ -115,7 +94,6 @@ class sdist_multi_gdal(sdist): print(_) sdist.run(self) - # By default we'll try to get options via gdal-config. On systems without, # options will need to be set in setup.cfg or on the setup command line. include_dirs = [] @@ -185,7 +163,13 @@ if source_is_repo and "clean" not in sys.argv: "Cython is required to build from a repo.") sys.exit(1) - copy_gdalapi_pyx(gdalversion) + if gdalversion.startswith("1"): + log.info("Building Fiona for gdal 1.x: {0}".format(gdalversion)) + shutil.copy('fiona/ogrext1.pyx', 'fiona/ogrext.pyx') + else: + log.info("Building Fiona for gdal 2.x: {0}".format(gdalversion)) + shutil.copy('fiona/ogrext2.pyx', 'fiona/ogrext.pyx') + ext_modules = cythonize([ Extension('fiona._geometry', ['fiona/_geometry.pyx'], **ext_options), Extension('fiona._transform', ['fiona/_transform.pyx'], **ext_options), @@ -193,16 +177,24 @@ if source_is_repo and "clean" not in sys.argv: Extension('fiona._drivers', ['fiona/_drivers.pyx'], **ext_options), Extension('fiona._err', ['fiona/_err.pyx'], **ext_options), Extension('fiona.ogrext', ['fiona/ogrext.pyx'], **ext_options)]) + # If there's no manifest template, as in an sdist, we just specify .c files. -else: - copy_gdalapi_c(gdalversion) +elif "clean" not in sys.argv: ext_modules = [ Extension('fiona._transform', ['fiona/_transform.cpp'], **ext_options), Extension('fiona._geometry', ['fiona/_geometry.c'], **ext_options), Extension('fiona._crs', ['fiona/_crs.c'], **ext_options), Extension('fiona._drivers', ['fiona/_drivers.c'], **ext_options), - Extension('fiona._err', ['fiona/_err.c'], **ext_options), - Extension('fiona.ogrext', ['fiona/ogrext.c'], **ext_options)] + Extension('fiona._err', ['fiona/_err.c'], **ext_options)] + + if gdalversion.startswith("1"): + log.info("Building Fiona for gdal 1.x: {0}".format(gdalversion)) + ext_modules.append( + Extension('fiona.ogrext', ['fiona/ogrext1.c'], **ext_options)) + else: + log.info("Building Fiona for gdal 2.x: {0}".format(gdalversion)) + ext_modules.append( + Extension('fiona.ogrext', ['fiona/ogrext2.c'], **ext_options)) requirements = [ 'cligj', -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/fiona.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

