Skip to content
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

pyx files not found when building wheel #8

Closed
aki-nishimura opened this issue Aug 21, 2021 · 5 comments
Closed

pyx files not found when building wheel #8

aki-nishimura opened this issue Aug 21, 2021 · 5 comments

Comments

@aki-nishimura
Copy link
Member

aki-nishimura commented Aug 21, 2021

When calling python -m build (bc6ded7), the source distribution builds fine, but building wheel from sdist fails with the error

ValueError: 'bayesbridge/random/tilted_stable/tilted_stable.pyx' doesn't match any files
bc6ded7

Any idea why this happens @chinandrew ? Not sure if this is any helpful, but the error comes from Cython's create_extension_list(), which in turn is called by setuptools's get_requires_for_build_wheel().

(For now, I have manually generated the cythonized C files and modified the setup.py, so that I can upload updated versions of the package to PyPI.)

@chinandrew
Copy link
Collaborator

Hmm interesting. Both python setup.py build and python setup.py sdist bdist_wheel are working for me on master. Are you running from the right directory?

@aki-nishimura
Copy link
Member Author

Actually, python setup.py build and python setup.py sdist bdist_wheel are working for me as well, though python -m build is still failing. (Previously, I thought python setup.py ... was failing because I forgot to rm -rf dist when updating package on TestPyPI.)

Maybe python -m build requires completely switching from setup.py to setup.cfg? In any case, since I can just use python setup.py ..., I will revert bc6ded7. Thanks for the help.

@chinandrew
Copy link
Collaborator

Ah sorry, misread that. python -m build works for me as well 🤔

@aki-nishimura
Copy link
Member Author

aki-nishimura commented Aug 22, 2021

Ha, good to know python -m build is working for you, though I still have no idea why it's failing on my end (macOS Catalina). I tried to look into the error, but pdb throws an error of its own during post mortem debugging (😂) and can't find any helpful info on the web.

I will leave the issue open, but will not worry further about this for now since python setup.py sdist bdist_wheel works fine.

@aki-nishimura
Copy link
Member Author

Adding *.pyx files via MANIFEST.in solves the issue c70744f994f8cae7f9b09d64e3ee1585c1927471 (silly me 🤦‍♂️). I somehow could not get the package_data argument to setup() working, but oh well.

setup_requires=['setuptools_scm'] seems like a better approach moving forward (https://www.remarkablyrestrained.com/python-setuptools-manifest-in/), so I will give it a try later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants