Browse code

Add installation

Robert Cranston authored on 08/10/2022 12:47:00
Showing 3 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+/.venv
... ...
@@ -11,6 +11,68 @@ Consider using [`glregistry`][] as a more robust alternative.
11 11
 [`grep`]: https://en.wikipedia.org/wiki/Grep
12 12
 [`glregistry`]: https://git.rcrnstn.net/rcrnstn/glregistry
13 13
 
14
+## Install
15
+
16
+Make sure [Python is installed][Python download], [`pip`][] is available and
17
+the [`pip`][], [`setuptools`][] and [`wheel`][] packages are up to date:
18
+
19
+```sh
20
+python3 -m pip install --user --upgrade pip setuptools wheel
21
+```
22
+
23
+Reference: [Python Packaging User Guide: Requirements for Installing
24
+Packages][].
25
+
26
+[Python download]: https://python.org/download
27
+[`pip`]: https://pip.readthedocs.io
28
+[`setuptools`]: https://setuptools.readthedocs.io
29
+[`wheel`]: https://wheel.readthedocs.io
30
+[Python Packaging User Guide: Requirements for Installing Packages]: https://packaging.python.org/tutorials/installing-packages/#requirements-for-installing-packages
31
+
32
+### With [`pipx`][], for users
33
+
34
+Make sure [`pipx`][] is installed:
35
+
36
+```sh
37
+python3 -m pip install --user pipx
38
+```
39
+
40
+Install `glewcompat`:
41
+
42
+```sh
43
+pipx install "git+https://git.rcrnstn.net/rcrnstn/glewcompat"
44
+```
45
+
46
+`glewcompat` should now be in your [`PATH`][] (if not, run `python3 -m pipx
47
+ensurepath`).
48
+
49
+Reference: [Python Packaging User Guide: Installing stand alone command line
50
+tools][].
51
+
52
+[`pipx`]: https://pipxproject.github.io/pipx/
53
+[`PATH`]: https://en.wikipedia.org/wiki/PATH_(variable)
54
+[Python Packaging User Guide: Installing stand alone command line tools]: https://packaging.python.org/guides/installing-stand-alone-command-line-tools/
55
+
56
+### Into [`venv`][], for developers
57
+
58
+Clone and install into a repository [`venv`][] virtual environment:
59
+
60
+```sh
61
+git clone "https://git.rcrnstn.net/rcrnstn/glewcompat"
62
+cd "glewcompat"
63
+python3 -m venv .venv
64
+. .venv/bin/activate
65
+python3 -m pip install --editable .
66
+```
67
+
68
+`glewcompat` should now be in your (virtual environment) [`PATH`][].
69
+
70
+Reference: [Python Packaging User Guide: Installing packages using pip and
71
+virtual environments][].
72
+
73
+[`venv`]: https://docs.python.org/3/library/venv.html
74
+[Python Packaging User Guide: Installing packages using pip and virtual environments]: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
75
+
14 76
 ## License
15 77
 
16 78
 Licensed under the [ISC License][] unless otherwise noted, see the
17 79
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='glewcompat',
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/glewcompat',
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=['glewcompat'],
24
+    entry_points={
25
+        'console_scripts': [
26
+            'glewcompat = glewcompat:main',
27
+        ],
28
+    },
29
+)