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

Modernize python scripts packaging, python versioning #3350

Closed
bollwyvl opened this issue Nov 10, 2021 · 2 comments · Fixed by #3379
Closed

Modernize python scripts packaging, python versioning #3350

bollwyvl opened this issue Nov 10, 2021 · 2 comments · Fixed by #3379

Comments

@bollwyvl
Copy link
Contributor

Hi folks, thanks for the antlrverse!

The current use of scripts in the PythonX runtimes makes it harder to generate otherwise-solid cross-platform downstream packages that have different constraints than e.g. PyPI. Adopting a newer approach, would look like:

    entry_points={
        'console_scripts': [
            "pygrun=some-importable.some-module:some-method"
        ]
    },

and would means that...

  • the functionality would move either into antlr4-pythonX-runtime.pygrun:main or some other thing
  • the .bat wrapper script would no longer be needed
  • downstreams could reason more about the generated files and where to put them
    • selfishly, for conda-forge, this would mean going from a matrix of 20+ builds to a single build.

Furthermore, as the description suggests a bottom python pin, formally declaring this would further improve the metadata for both pip users and others.

    python_requires='>=3.7',

Thanks again!

@bollwyvl
Copy link
Contributor Author

We went ahead and did this over on conda-forge:

conda-forge/antlr-python-runtime-feedstock#31

Will submit a patch with that approach.

@bollwyvl
Copy link
Contributor Author

Opened #3379

parrt added a commit to bollwyvl/antlr4 that referenced this issue Dec 28, 2021
parrt added a commit that referenced this issue Dec 28, 2021
[Python3] rename pygrun, add entry_point
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

Successfully merging a pull request may close this issue.

1 participant