mirror of
https://github.com/rasterio/rasterio.git
synced 2026-02-01 14:34:43 +00:00
Use setuptools>=0.9.8 since earlier versions don't Cythonize C files
Change Extension import from distutils to setuptools Also add "-W all" debug output to setup.py logger
This commit is contained in:
parent
3182186fae
commit
ba3a1645a4
@ -6,5 +6,5 @@ delocate
|
||||
enum34
|
||||
numpy>=1.8.0
|
||||
pytest
|
||||
setuptools
|
||||
setuptools>=0.9.8
|
||||
wheel
|
||||
|
||||
17
setup.py
17
setup.py
@ -9,18 +9,23 @@
|
||||
# source or binary distribution. This is essential when creating self-contained
|
||||
# binary wheels.
|
||||
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from setuptools import setup
|
||||
import pprint
|
||||
import shutil
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
from distutils.extension import Extension
|
||||
from setuptools import setup
|
||||
from setuptools.extension import Extension
|
||||
|
||||
logging.basicConfig()
|
||||
log = logging.getLogger()
|
||||
|
||||
# python -W all setup.py ...
|
||||
if 'all' in sys.warnoptions:
|
||||
log.level = logging.DEBUG
|
||||
|
||||
# Parse the version from the fiona module.
|
||||
with open('rasterio/__init__.py') as f:
|
||||
for line in f:
|
||||
@ -104,6 +109,8 @@ ext_options = dict(
|
||||
libraries=libraries,
|
||||
extra_link_args=extra_link_args)
|
||||
|
||||
log.debug('ext_options:\n%s', pprint.pformat(ext_options))
|
||||
|
||||
# When building from a repo, Cython is required.
|
||||
if os.path.exists("MANIFEST.in") and "clean" not in sys.argv:
|
||||
log.info("MANIFEST.in found, presume a repo, cythonizing...")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user