Skip to content

switched to using static metadata - #153

Merged
jspaaks merged 3 commits into
mainfrom
84-static-metadata
Apr 14, 2021
Merged

jspaaks merged 3 commits into
mainfrom
84-static-metadata

Conversation

@jspaaks

@jspaaks jspaaks commented Apr 14, 2021 •

Copy link
Copy Markdown

In this PR, I switched the configuration from setup.py over to a static configuration in setup.cfg as per the recommended best practices.

Refs #84

Note that our use of data_files requires a setuptools>=40.6.0, my installation did not meet that out of the box, so had to do pip install --upgrade setuptools

Assuming you have cookiecutter installed in user space, test with:

cd $(mktemp -d --tmpdir python-template.XXXXXX)
git clone https://github.com/NLeSC/python-template.git
cd python-template
git checkout 84-static-metadata
cd ..

cookiecutter python-template
# answer the questions by pressing enter for default answers

cd my_python_project
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade setuptools

# this next step should now work:
pip install .[dev]

# should run but has failing tests
pytest

# should build a source distribution 
python setup.py sdist 

# check tar contents
cd dist && tar -xvzf my_python_project-0.1.0.tar.gz
my_python_project-0.1.0/
my_python_project-0.1.0/setup.py
my_python_project-0.1.0/my_python_project/
my_python_project-0.1.0/my_python_project/__version__.py
my_python_project-0.1.0/my_python_project/__init__.py
my_python_project-0.1.0/my_python_project/my_python_project.py
my_python_project-0.1.0/NOTICE
my_python_project-0.1.0/setup.cfg
my_python_project-0.1.0/MANIFEST.in
my_python_project-0.1.0/README.rst
my_python_project-0.1.0/PKG-INFO
my_python_project-0.1.0/my_python_project.egg-info/
my_python_project-0.1.0/my_python_project.egg-info/SOURCES.txt
my_python_project-0.1.0/my_python_project.egg-info/dependency_links.txt
my_python_project-0.1.0/my_python_project.egg-info/not-zip-safe
my_python_project-0.1.0/my_python_project.egg-info/requires.txt
my_python_project-0.1.0/my_python_project.egg-info/PKG-INFO
my_python_project-0.1.0/my_python_project.egg-info/top_level.txt
my_python_project-0.1.0/CITATION.cff
my_python_project-0.1.0/LICENSE

cat my_python_project-0.1.0/PKG-INFO
Metadata-Version: 2.1
Name: my_python_project
Version: 0.1.0
Summary: UNKNOWN
Home-page: "https://github.com/<my-github-organization>/my_python_project
Author: John Smith
Author-email: yourname@esciencecenter.nl
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/<my-github-organization>/my_python_project/issues
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Provides-Extra: dev

@fdiblen
fdiblen self-requested a review April 14, 2021 13:30
@jspaaks

jspaaks commented Apr 14, 2021

Copy link
Copy Markdown
Author

Add NOTICE to MANIFEST.in

@fdiblen fdiblen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great @jspaaks. I tested it locally and everything seems to be working. Good job! 🎖️

@jspaaks

jspaaks commented Apr 14, 2021

Copy link
Copy Markdown
Author

Thanks for reviewing!

@jspaaks
jspaaks merged commit d42d321 into main Apr 14, 2021
@jspaaks
jspaaks deleted the 84-static-metadata branch April 14, 2021 13:58
This was referenced Apr 19, 2021
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 this pull request may close these issues.

2 participants