Small example of Python 3 package.
If pip is installed on your platform you can do:
>>> pip3 install --index-url https://test.pypi.org/simple/ example_pkg_opi
Without pip, download the archive
example_pkg_opi-?.tar.gz, unzip it
Next in the
somewhere/example_pkg_opi-?/ subdirectory run:
>>> python3 setup.py install
In both cases, you must use admin access. So with GNU/Linux you will probably do:
>>> sudo [your command]
Or you can install in user environment with:
>>> pip3 install --user --index-url https://test.pypi.org/simple/ example_pkg_opi
Python documentation on package and distributing projects¶
- Tutorials / Packaging Python Projects: https://packaging.python.org/tutorials/packaging-projects/
- Guides / Packaging and distributing projects: https://packaging.python.org/guides/distributing-packages-using-setuptools/
- Guides / Using TestPyPI: https://packaging.python.org/guides/using-testpypi/
- How To Package Your Python Code https://python-packaging.readthedocs.io/
Copyright (C) 2019 Olivier Pirson
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Logo composed from these two images:
- Generic, package icon: https://www.iconfinder.com/icons/118888/generic_package_icon
- Python Generic Application Logo: https://www.openclipart.org/detail/213925/python-generic-application-logo
- 1.0.5 — February 11, 2019
- Improved package building and doc, and minor corrections.
- 1.0.0 — February 10, 2019 — First public version