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

PKG-INFO Missing Metadata #1688

Open
benieric opened this issue Aug 21, 2024 · 6 comments
Open

PKG-INFO Missing Metadata #1688

benieric opened this issue Aug 21, 2024 · 6 comments

Comments

@benieric
Copy link

Hello @ofek, the sagemaker-python-sdk recently migrated our build system to use pyproject.toml and hatchling in this PR - aws/sagemaker-python-sdk#3529

But it looks like the metadata is not being packaged correctly, when uploading to PyPI - https://pypi.org/project/sagemaker/2.229.0/#description

When I download the distribution and check the PKG-INFO I see some of the metadata is missing:

╭─ ~/workplace/tmp/sagemaker-2.229.0 ··················································································································  py3.10.14 3.10.14 02:13:24 PM ─╮
╰─❯ cat PKG-INFO                                                                                                                                                                        ─╯
Metadata-Version: 2.1
Name: sagemaker
Version: 2.229.0
Summary: UNKNOWN
Home-page: UNKNOWN
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
Provides-Extra: all
Provides-Extra: feature-processor
Provides-Extra: huggingface
Provides-Extra: local
Provides-Extra: scipy
Provides-Extra: test
@ofek
Copy link
Sponsor Collaborator

ofek commented Aug 21, 2024

What is the build job that produces the final artifacts?

@benieric
Copy link
Author

benieric commented Aug 21, 2024

I think it could be due to python version? Because, when I run the same locally using Py3.10, the PKG-INFO shows as expected.

The job we run is in a CodeBuild project which runs the following commands:

"pip install wheel",

"python3 setup.py sdist bdist_wheel",

...

"python3 -m twine upload $PACKAGE_FILES -u $PYPI_USER -p $PYPI_PASSWORD",

@benieric
Copy link
Author

benieric commented Aug 21, 2024

git clone [email protected]:aws/sagemaker-python-sdk.git
cd sagemaker-python-sdk
python setup.py sdist
cd dist
tar -xvf sagemaker-2.229.1.dev0.tar.gz
cd sagemaker-2.229.1.dev0
╭─ ~/workplace/sagemaker-python-sdk/dist/sagemaker-2.229.1.dev0 master ················································································  py3.10.14 3.10.14 02:53:24 PM ─╮
╰─❯ cat PKG-INFO                                                                                                                                                                        ─╯
Metadata-Version: 2.1
Name: sagemaker
Version: 2.229.1.dev0
Summary: Open source library for training and deploying models on Amazon SageMaker.
Author: Amazon Web Services
Project-URL: Homepage, https://github.com/aws/sagemaker-python-sdk
Keywords: AI,AWS,Amazon,ML,MXNet,Tensorflow
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: NOTICE.txt
...

@benieric
Copy link
Author

Our job runs in py3.8

root@feb069ce3127:/# python3 --version
Python 3.8.18

@ofek
Copy link
Sponsor Collaborator

ofek commented Aug 21, 2024

Oh, are you able to change the build process to do python -m build rather than python setup.py ...?

@ofek
Copy link
Sponsor Collaborator

ofek commented Aug 22, 2024

Were you able to get it working?

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