Skip to content

Commit 5d16efc

Browse files
committed
SETUP: Esure cythonize runs
Ensure cythonize runs so that sdist will work
1 parent ffcb92e commit 5d16efc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
from setuptools.dist import Distribution
1414
import versioneer
1515

16+
DEVELOP = False
17+
1618
try:
1719
import Cython.Tempita as tempita
1820
except ImportError:
@@ -219,15 +221,15 @@ def cythonize(e, *args, **kwargs):
219221
files = glob.glob('./randomstate/*.in')
220222
for templated_file in files:
221223
output_file_name = os.path.splitext(templated_file)[0]
222-
if (os.path.exists(output_file_name) and
224+
if (DEVELOP and os.path.exists(output_file_name) and
223225
(os.path.getmtime(templated_file) < os.path.getmtime(output_file_name))):
224226
continue
225227
with open(templated_file, 'r') as source_file:
226228
template = tempita.Template(source_file.read())
227229
with open(output_file_name, 'w') as output_file:
228230
output_file.write(template.substitute())
229231

230-
ext_modules = cythonize(extensions)
232+
ext_modules = cythonize(extensions, force=not DEVELOP)
231233

232234
classifiers = ['Development Status :: 5 - Production/Stable',
233235
'Environment :: Console',

0 commit comments

Comments
 (0)