ENH: Add entry_points for f2py, conv_template, and from_template.#10463
Conversation
|
@xoviat it would be really helpful to get a higher level description with these kinds of PRs. E.g. what's the improvement for an end user? is this only an update to more recent packaging practices or does it fix an open issue? |
|
NumPy still uses the old "scripts" mechanism, which was deprecated in favor of entry_points. The reason is that entry_points are less fragile and more reliable than scripts. |
I assume this is a |
|
That was pypa/setuptools@1c40632 |
|
In principle +1 on this change. We've had a lot of issues with |
Note: this doesn't need any additional testing because entry_points is a setuptools feature that is already well-tested. There is no reason that the NumPy use-case would be different than the use case for other projects. |
| entry_points={ | ||
| 'console_scripts': [ | ||
| 'f2py = numpy.f2py.__main__:main', | ||
| 'conv-template = numpy.distutils.conv_template:main', |
There was a problem hiding this comment.
conv-template or conv_template?
There was a problem hiding this comment.
There are other scripts, should they be added also?
There was a problem hiding this comment.
- Command names usually contain dashes.
- Which other scripts are there?
There was a problem hiding this comment.
There is from_template.py, used by f2py and cythonize.py. I'm not clear just what needs an entry point or why. Note that process_file is the part of conv_template that is actually imported and used in the build, conv_template is used as a module rather than a script.
|
@charris I've added from_template as well. |
|
AFAICT, this can't hurt, so let's give it a shot. Thanks @xoviat. I do have a question, does this work on windows? Google indicates that the setting of the |
Yes. |
…mpy#10463) * Add entry points for f2py and conv-template * Add main function to conv_template * Extract function * Add entry point
The changes introduced in numpy#10463 caused f2py to hang in somde circumstances. There is may a better fix than this, but until it is implemented it is better to undo the change. Closes numpy#11649.
The changes introduced in numpy#10463 caused f2py to hang in somde circumstances. There is may a better fix than this, but until it is implemented it is better to undo the change. Closes numpy#11649.
I couldn't shoehorn entry_points into the configuration object.
Closes gh-10462.