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

Update Python packaging approach to pyproject.toml #136

Open
jenstroeger opened this issue Sep 5, 2022 · 3 comments
Open

Update Python packaging approach to pyproject.toml #136

jenstroeger opened this issue Sep 5, 2022 · 3 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jenstroeger
Copy link

Is your feature request related to a problem? Please describe.

After looking through .circleci/packaging/python, it seems to me that the Python package uses the somewhat dated setup.py approach. There’s much discussion to remove it from the documentation and to guide packages in migrating to myproject.toml (PEP 631). (Also note that according to this announcement the support for setup.py will be removed from Python 3.12 internal packages.)

Describe the solution you'd like

It shouldn’t be too difficult to migrate and to follow the updated packaging guidelines, and move the package forward to the new approach.

Describe alternatives you've considered

Nope.

Additional context

Looking at the current setup.py I don’t see a minimum Python version specified although the classifiers indicate that support for Python 2.7 is required (the classifiers are incomplete too). However, there’s a second repository googleapis/python-api-common-protos whose content is generated from this repository? There too, setup.py should be replaced.

I’m not sure which one of the repositories is the base…

@jenstroeger jenstroeger added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Sep 5, 2022
@parthea parthea transferred this issue from googleapis/api-common-protos Sep 15, 2022
@Lawouach
Copy link

Lawouach commented Jan 9, 2023

Hi,

This is indeed a bit of an issue that this lib isn't modernized to match where the Python Packaging ecosystem is going. It does leave warnings when deployed with tools such as PDM.

@chalmerlowe
Copy link

I don't know if it is still a concern, but at one point even if you switched to pyproject.toml there was a requirement to provide a shim in setup.py if you wanted to be able to install a package in editable mode (i.e. using pip install -e):

#!/usr/bin/env python

import setuptools

if __name__ == "__main__":
    setuptools.setup()

@jenstroeger
Copy link
Author

@chalmerlowe that shouldn’t be an issue anymore, see here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants