| ... | ... |
@@ -6,6 +6,68 @@ Cache and query the [OpenGL][] [registry][] locally. |
| 6 | 6 |
[OpenGL]: https://en.wikipedia.org/wiki/OpenGL |
| 7 | 7 |
[registry]: https://registry.khronos.org/OpenGL/ |
| 8 | 8 |
|
| 9 |
+## Install |
|
| 10 |
+ |
|
| 11 |
+Make sure [Python is installed][Python download], [`pip`][] is available and |
|
| 12 |
+the [`pip`][], [`setuptools`][] and [`wheel`][] packages are up to date: |
|
| 13 |
+ |
|
| 14 |
+```sh |
|
| 15 |
+python3 -m pip install --user --upgrade pip setuptools wheel |
|
| 16 |
+``` |
|
| 17 |
+ |
|
| 18 |
+Reference: [Python Packaging User Guide: Requirements for Installing |
|
| 19 |
+Packages][]. |
|
| 20 |
+ |
|
| 21 |
+[Python download]: https://python.org/download |
|
| 22 |
+[`pip`]: https://pip.readthedocs.io |
|
| 23 |
+[`setuptools`]: https://setuptools.readthedocs.io |
|
| 24 |
+[`wheel`]: https://wheel.readthedocs.io |
|
| 25 |
+[Python Packaging User Guide: Requirements for Installing Packages]: https://packaging.python.org/tutorials/installing-packages/#requirements-for-installing-packages |
|
| 26 |
+ |
|
| 27 |
+### With [`pipx`][], for users |
|
| 28 |
+ |
|
| 29 |
+Make sure [`pipx`][] is installed: |
|
| 30 |
+ |
|
| 31 |
+```sh |
|
| 32 |
+python3 -m pip install --user pipx |
|
| 33 |
+``` |
|
| 34 |
+ |
|
| 35 |
+Install `glregistry`: |
|
| 36 |
+ |
|
| 37 |
+```sh |
|
| 38 |
+pipx install "git+https://git.rcrnstn.net/rcrnstn/glregistry" |
|
| 39 |
+``` |
|
| 40 |
+ |
|
| 41 |
+`glregistry` should now be in your [`PATH`][] (if not, run `python3 -m pipx |
|
| 42 |
+ensurepath`). |
|
| 43 |
+ |
|
| 44 |
+Reference: [Python Packaging User Guide: Installing stand alone command line |
|
| 45 |
+tools][]. |
|
| 46 |
+ |
|
| 47 |
+[`pipx`]: https://pipxproject.github.io/pipx/ |
|
| 48 |
+[`PATH`]: https://en.wikipedia.org/wiki/PATH_(variable) |
|
| 49 |
+[Python Packaging User Guide: Installing stand alone command line tools]: https://packaging.python.org/guides/installing-stand-alone-command-line-tools/ |
|
| 50 |
+ |
|
| 51 |
+### Into [`venv`][], for developers |
|
| 52 |
+ |
|
| 53 |
+Clone and install into a repository [`venv`][] virtual environment: |
|
| 54 |
+ |
|
| 55 |
+```sh |
|
| 56 |
+git clone "https://git.rcrnstn.net/rcrnstn/glregistry" |
|
| 57 |
+cd "glregistry" |
|
| 58 |
+python3 -m venv .venv |
|
| 59 |
+. .venv/bin/activate |
|
| 60 |
+python3 -m pip install --editable . |
|
| 61 |
+``` |
|
| 62 |
+ |
|
| 63 |
+`glregistry` should now be in your (virtual environment) [`PATH`][]. |
|
| 64 |
+ |
|
| 65 |
+Reference: [Python Packaging User Guide: Installing packages using pip and |
|
| 66 |
+virtual environments][]. |
|
| 67 |
+ |
|
| 68 |
+[`venv`]: https://docs.python.org/3/library/venv.html |
|
| 69 |
+[Python Packaging User Guide: Installing packages using pip and virtual environments]: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ |
|
| 70 |
+ |
|
| 9 | 71 |
## License |
| 10 | 72 |
|
| 11 | 73 |
Licensed under the [ISC License][] unless otherwise noted, see the |
| 12 | 74 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,29 @@ |
| 1 |
+from setuptools import setup |
|
| 2 |
+ |
|
| 3 |
+with open("README.md") as f:
|
|
| 4 |
+ long_description = f.read() |
|
| 5 |
+ |
|
| 6 |
+setup( |
|
| 7 |
+ name='glregistry', |
|
| 8 |
+ version='1.0.0', |
|
| 9 |
+ description=""" |
|
| 10 |
+ Cache and query the OpenGL registry locally. |
|
| 11 |
+ """, |
|
| 12 |
+ long_description=long_description, |
|
| 13 |
+ long_description_content_type='text/markdown', |
|
| 14 |
+ url='https://git.rcrnstn.net/rcrnstn/glregistry', |
|
| 15 |
+ author="Robert Cranston", |
|
| 16 |
+ classifiers=[ |
|
| 17 |
+ 'Programming Language :: Python :: 3', |
|
| 18 |
+ 'License :: OSI Approved :: ISC License (ISCL)', |
|
| 19 |
+ ], |
|
| 20 |
+ python_requires='>=3, <4', |
|
| 21 |
+ install_requires=[ |
|
| 22 |
+ ], |
|
| 23 |
+ py_modules=['glregistry'], |
|
| 24 |
+ entry_points={
|
|
| 25 |
+ 'console_scripts': [ |
|
| 26 |
+ 'glregistry = glregistry:main', |
|
| 27 |
+ ], |
|
| 28 |
+ }, |
|
| 29 |
+) |