Browse code

Add installation

Robert Cranston authored on 14/10/2020 01:13:31
Showing 3 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+/.venv
2
+/__pycache__
3
+/*.egg-info
... ...
@@ -6,6 +6,68 @@
6 6
 [scrape]: https://en.wikipedia.org/wiki/Web_scraping
7 7
 [intranet.bygglogistik.se]: http://intranet.bygglogistik.se
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 `bygglogistik-utils`:
36
+
37
+```sh
38
+pipx install "git+https://git.rcrnstn.net/rcrnstn/bygglogistik-utils"
39
+```
40
+
41
+`bygglogistik-utils` should now be in your [`PATH`][] (if not, run `python3 -m
42
+pipx 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/bygglogistik-utils"
57
+cd "bygglogistik-utils"
58
+python3 -m venv .venv
59
+. .venv/bin/activate
60
+python3 -m pip install --editable .
61
+```
62
+
63
+`bygglogistik-utils` 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,30 @@
1
+from setuptools import setup
2
+
3
+with open("README.md") as f:
4
+    long_description = f.read()
5
+
6
+setup(
7
+    name='bygglogistik-utils',
8
+    version='1.0.0',
9
+    description="""
10
+        Scrape intranet.bygglogistik.se.
11
+    """,
12
+    long_description=long_description,
13
+    long_description_content_type='text/markdown',
14
+    url='https://git.rcrnstn.net/rcrnstn/bygglogistik-utils',
15
+    author="Robert Cranston",
16
+    keywords='finance',
17
+    classifiers=[
18
+        'Programming Language :: Python :: 3',
19
+        'License :: OSI Approved :: ISC License (ISCL)',
20
+    ],
21
+    python_requires='>=3, <4',
22
+    install_requires=[
23
+    ],
24
+    py_modules=['bygglogistik_utils'],
25
+    entry_points={
26
+        'console_scripts': [
27
+            'bygglogistik-utils = bygglogistik_utils:main',
28
+        ],
29
+    },
30
+)