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:
Mike Toews 2015-01-16 11:15:24 +13:00
parent 3182186fae
commit ba3a1645a4
2 changed files with 13 additions and 6 deletions

View File

@ -6,5 +6,5 @@ delocate
enum34
numpy>=1.8.0
pytest
setuptools
setuptools>=0.9.8
wheel

View File

@ -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...")