1
0
mirror of synced 2024-11-12 01:00:46 +01:00

Fix manifest to not exclude cythonized files if we are building pure python.

This commit is contained in:
Jennifer Taylor 2021-08-12 16:31:59 +00:00
parent c457216294
commit ee3b18bfcb
4 changed files with 18 additions and 4 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ bemani.egg-info/
server/
emblems
.vscode/
MANIFEST.in

View File

@ -19,7 +19,3 @@ include bemani/frontend/static/controllers/ddr/*.js
include bemani/frontend/static/controllers/reflec/*.js
include bemani/frontend/static/controllers/sdvx/*.js
include bemani/frontend/static/controllers/museca/*.js
exclude bemani/protocol/lz77.py
exclude bemani/protocol/stream.py
exclude bemani/protocol/binary.py
exclude bemani/protocol/xml.py

8
MANIFEST.cython Normal file
View File

@ -0,0 +1,8 @@
exclude bemani/protocol/lz77.py
exclude bemani/protocol/stream.py
exclude bemani/protocol/binary.py
exclude bemani/protocol/node.py
exclude bemani/protocol/protocol.py
exclude bemani/protocol/xml.py
exclude bemani/format/afp/types/generic.py
exclude bemani/format/dxt.py

View File

@ -10,6 +10,9 @@ def extensions():
# extensions. Note that the pure python code will run slower.
if 'PURE_PYTHON' in os.environ:
# We've been asked not to compile extensions.
with open("MANIFEST.in", "w") as wfp:
with open("MANIFEST.assets", "r") as rfp:
wfp.write(rfp.read())
return []
from setuptools import Extension
@ -42,6 +45,12 @@ def extensions():
),
]
with open("MANIFEST.in", "w") as wfp:
with open("MANIFEST.assets", "r") as rfp:
wfp.write(rfp.read())
with open("MANIFEST.cython", "r") as rfp:
wfp.write(rfp.read())
if 'EXPERIMENTAL_MYPYC_COMPILER' in os.environ:
from mypyc.build import mypycify