Skip to content

Commit 0a1fb58

Browse files
committed
Add basic packaging stuff
Add `setup.py` to create dist files. Add `Makefile` to build dist files, publish distribution and clean file tree.
1 parent 917f00b commit 0a1fb58

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
default: help
2+
3+
help:
4+
@echo "Please use \`make <target>' where <target> is one of:"
5+
@echo " help - to show this message"
6+
@echo " dist - to build the collection archive"
7+
@echo " lint - to run code linting"
8+
9+
lint:
10+
flake8 pyhpipam
11+
12+
dist:
13+
python3 setup.py sdist bdist_wheel
14+
15+
publis:
16+
python3 -m twine upload --repository testpypi dist/*
17+
18+
clean:
19+
rm -rf build/
20+
rm -rf dist/
21+
rm -rf *.egg-info
22+
find . -name '*.pyc' -exec rm -f {} +
23+
find . -name '*.pyo' -exec rm -f {} +
24+
find . -name '*~' -exec rm -f {} +
25+
find . -name '__pycache__' -exec rm -rf {} +
26+
27+
FORCE:
28+
29+
.PHONY: help dist lint publish FORCE

setup.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import setuptools
2+
3+
with open("README.md", "r") as fh:
4+
long_description = fh.read()
5+
6+
setuptools.setup(
7+
name="pyhpipam",
8+
version="0.0.1",
9+
author="Christian Meißner",
10+
author_email="Christian Meißner <[email protected]>",
11+
description="Python API client library for phpIPAM installation",
12+
long_description=long_description,
13+
long_description_content_type="text/markdown",
14+
license="GPLv3",
15+
platform="Independent",
16+
url="https://github.com/codeaffen/pyhpipam",
17+
packages=setuptools.find_packages(),
18+
classifiers=[
19+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
20+
"Programming Language :: Python :: 3",
21+
"Operating System :: OS Independent",
22+
],
23+
python_requires='>=3.6',
24+
)

0 commit comments

Comments
 (0)