Say Hello!
Project description
Create Your Own Python Package
Based on the talk here: https://www.youtube.com/watch?v=GIF3LaRqgXo&ab_channel=CodingTech
Step 1
- Create your Python module (in here it is helloworld.py)
- Create setup.py file (see setup.py file)
- Run "python setup.py bdist_wheel" (creates build, dist, and other folders/files)
- Optional: Create .gitignore (just good practice, checkout gitignore.io)
- Add the .egg-info file in the src directory to the .gitignore (it is unnecessary apparently).
- Create README.md
- Run "pip install -e ." to install this package locally (run frequently to check your work)
- Add a license (checkout choosealicense.com). MIT License added here by default.
- Optional: Run some tests (checkout a package called pytest, it is great)
- Run "pip install check-manifest", then "check-manifest --create", then "git add MANIFEST.in" (this helps the next step run properly)
- Run "python setup.py sdist" to create a .tar.gz file with the source code for distribution
- Run "python setup.py bdist_wheel sdist"
- Run "pip install twine", then "twine upload dist/*...woohoo, you have now uploaded it!
- To test with different versions of Python, checkout the "tox" package
- To get started, it is best to use the "cookiecutter" package! Run "pip install cookiecutter" then "cookiecutter gh: ionelmc/cookiecutter-pylibrary
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for patrick_helloworld-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bef6dad9bca3bbe5085b3109448eb01e3b913ca3779bafe30b6d842a97f0bb04 |
|
MD5 | d2a384df0d6e14f15787c04d0ac36588 |
|
BLAKE2b-256 | b268602493ab715d1d0baf41f7881cea8f965499c96428e4077b46d275d13d3e |