2017-04-10 21:42:12 +01:00
|
|
|
from setuptools import setup, Extension
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
if sys.argv[-1] != '--name':
|
2017-04-11 23:23:50 +01:00
|
|
|
# assert that the Python version as written to version.txt in the CIBW_BEFORE_BUILD step
|
|
|
|
|
# is the same one as is currently running.
|
2017-04-10 22:41:08 +01:00
|
|
|
version_file = 'c:\\pythonversion.txt' if sys.platform == 'win32' else '/tmp/pythonversion.txt'
|
2017-04-10 22:36:06 +01:00
|
|
|
with open(version_file) as f:
|
2017-04-10 21:42:12 +01:00
|
|
|
stored_version = f.read()
|
2017-04-10 21:56:26 +01:00
|
|
|
print('stored_version', stored_version)
|
|
|
|
|
print('sys.version', sys.version)
|
2017-04-10 21:42:12 +01:00
|
|
|
assert stored_version == sys.version
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
|
name="spam",
|
|
|
|
|
ext_modules=[Extension('spam', sources=['spam.c'])],
|
|
|
|
|
version="0.1.0",
|
|
|
|
|
)
|