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
Cython is missing executables #307596
Comments
Alpine doesn't install those either so should be a upstream issue https://pkgs.alpinelinux.org/contents?file=&path=&name=cython&branch=edge&repo=main&arch=x86_64, they can be installed in the derivation if that is the intention of upstream. |
Yeah, after looking into this some more I forgot to update the issue. I'm not familiar with python packaging but it seems like whatever python binary packages are these days, the scripts and 'entry_points' directives in setup.py result in their implicit inclusion and installation. This wasn't exactly clear to me from any of the setuptools documentation but it can more-or-less be inferred. Also IIRC the specific mechanism seems to be limited to unix systems and python files but I'd have to recheck what the precise conditions were for what. Patching the below does successfully result in adding cythonrun at least. (for cython 0.29.34:) diff --git a/Cython/Build/BuildExecutable.py b/Cython/Build/BuildExecutable.py
index 2db9e5d..293e744 100644
--- a/Cython/Build/BuildExecutable.py
+++ b/Cython/Build/BuildExecutable.py
@@ -138,5 +138,8 @@ def build_and_run(args):
program_name = build(input_file, cy_args)
exec_file(program_name, args)
-if __name__ == '__main__':
+def main():
build_and_run(sys.argv[1:])
+
+if __name__ == '__main__':
+ main()
diff --git a/setup.py b/setup.py
index 027e0fc..b937afd 100755
--- a/setup.py
+++ b/setup.py
@@ -69,13 +69,14 @@ if 'setuptools' in sys.modules:
'console_scripts': [
'cython = Cython.Compiler.Main:setuptools_main',
'cythonize = Cython.Build.Cythonize:main',
+ 'cythonrun = Cython.Build.BuildExecutable:main',
'cygdb = Cython.Debugger.Cygdb:main',
]
}
scripts = []
else:
if os.name == "posix":
- scripts = ["bin/cython", "bin/cythonize", "bin/cygdb"]
+ scripts = ["bin/cython", "bin/cythonize", "bin/cygdb", "bin/cythonrun"]
else:
scripts = ["cython.py", "cythonize.py", "cygdb.py"]
|
Submit upstream and see what they say? |
For example, these exist in the cython source tree but I cant find them anywhere on my machine or with nix-locate.
xref cython/cython#6170
cython packaged at https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/python-modules/cython
The text was updated successfully, but these errors were encountered: