Skip to content

BLD: don't require cython on sdist install #14475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.19.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Bug Fixes



- Source installs from PyPI will now work without ``cython`` installed, as in previous version (:issue:`14204`)

- ``pd.merge()`` will raise ``ValueError`` with non-boolean parameters in passed boolean type arguments (:issue:`14434`)

Expand Down
34 changes: 17 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,25 @@ def is_platform_mac():
class build_ext(_build_ext):
def build_extensions(self):

if not cython:
raise ImportError('Building pandas requires cython')

for pxifile in _pxifiles:
# build pxifiles first, template extention must be .pxi.in
assert pxifile.endswith('.pxi.in')
outfile = pxifile[:-3]

if (os.path.exists(outfile) and
os.stat(pxifile).st_mtime < os.stat(outfile).st_mtime):
# if .pxi.in is not updated, no need to output .pxi
continue
# if builing from c files, don't need to
# generate template output
if cython:
for pxifile in _pxifiles:
# build pxifiles first, template extention must be .pxi.in
assert pxifile.endswith('.pxi.in')
outfile = pxifile[:-3]

if (os.path.exists(outfile) and
os.stat(pxifile).st_mtime < os.stat(outfile).st_mtime):
# if .pxi.in is not updated, no need to output .pxi
continue

with open(pxifile, "r") as f:
tmpl = f.read()
pyxcontent = tempita.sub(tmpl)
with open(pxifile, "r") as f:
tmpl = f.read()
pyxcontent = tempita.sub(tmpl)

with open(outfile, "w") as f:
f.write(pyxcontent)
with open(outfile, "w") as f:
f.write(pyxcontent)

numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')

Expand Down