diff --git a/.gitignore b/.gitignore index 4fc828a..c6622bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__/ .venv/ backup_tool +*.egg-info/ diff --git a/Makefile b/Makefile index 5f6e639..37a06ea 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,19 @@ # =====CONFIG===== # Devop environment runs in 3.8 -PYTHON=python3.8 +# TODO switch this to python3.6 +PYTHON=python3.9 # =====RECIPES===== -.venv/bin/activate: requirements.txt requirements-dev.txt +.venv/bin/activate: setup.py '$(PYTHON)' -m venv .venv - .venv/bin/pip install -r requirements.txt -r requirements-dev.txt + .venv/bin/pip install -e .[dev] venv: .venv/bin/activate .PHONY: venv format: venv - @ .venv/bin/black app/*.py app/**/*.py + @ .venv/bin/black setup.py app/*.py app/**/*.py .PHONY: format clean: @@ -33,3 +34,4 @@ app: backup_tool install: app cp backup_tool /usr/local/bin +.PHONY: install diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 3eed54f..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Language server -jedi==0.18.0 - -# Linting & Formatting -black==20.8b1 -flake8==3.8.4 - -# Testing -tox==3.21.1 -pytest==6.2.1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..8320683 --- /dev/null +++ b/setup.py @@ -0,0 +1,19 @@ +from setuptools import setup + +setup( + name="backup-tool", + version="0.1.0", + author="Jef Roosens", + description="A utility to simply backing up services.", + # TODO add license + packages=["app", "tests"], + extras_require={ + "dev": [ + "jedi==0.18.0", + "black==20.8b1", + "flake8==3.8.4", + "tox==3.21.1", + "pytest==6.2.1", + ] + }, +) diff --git a/requirements.txt b/tests/.gitkeep similarity index 100% rename from requirements.txt rename to tests/.gitkeep