From 45248c3266fdad24d24456baf880c573dba0a00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carneiro?= Date: Fri, 27 Sep 2024 14:35:14 -0400 Subject: [PATCH] chore: update dependencies and build files --- .gitignore | 1 + Makefile | 29 ++++++++++++++++------------- pyproject.toml | 22 ++++++++++++++++++++++ setup.py | 24 ------------------------ 4 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index c7fcb25..c239c63 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ coverage.xml *.cover .hypothesis/ .pytest_cache/ +data/ # Translations *.mo diff --git a/Makefile b/Makefile index 6a9de03..5a86bad 100644 --- a/Makefile +++ b/Makefile @@ -4,28 +4,31 @@ env: env/bin/activate env/bin/activate: python3 -m venv env -.PHONY: full -full: develop config trans - @echo - @echo All Good!! - -.PHONY: develop -develop: setup.py - pip install -e .[dev] - -.PHONY: setup -install: env setup.py +.PHONY: install +install: env pip install -e . +.PHONY: build +build: + python3 -m build + .PHONY: clean clean: - rm -rf *.egg-info build dist - find unifi_api tests -name __pycache__ -type d -exec rm -rf '{}' \; + rm -rf src/*.egg-info dist + find src tests -name __pycache__ -type d -exec rm -rf '{}' \; .PHONY: distclean distclean: clean rm -rf env +.PHONY: test-upload +test-upload: + python3 -m twine upload --repository testpypi dist/* + +.PHONY: upload +upload: + python3 -m twine upload dist/* + .PHONY: secret secret: @openssl rand -base64 48 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e13f4bb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +[project] +name = "unifi-python-api" +version = "0.2.3" +authors = [ + { name="André Carneiro", email="acarneiro.dev@gmail.com" }, +] +dependencies = ['requests<3,>=2.32.0', 'trafaret<3,>=2.1.1'] +description = "A small example package" +readme = "README.md" +requires-python = ">=3.8" +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Development Status :: 3 - Alpha", + "Intended Audience :: Information Technology", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities", +] + +[project.urls] +Homepage = "https://github.com/r4mmer/unifi_python_api" +Issues = "https://github.com/r4mmer/unifi_python_api/issues" diff --git a/setup.py b/setup.py deleted file mode 100644 index dae52be..0000000 --- a/setup.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -from setuptools import setup, find_packages - -setup( - name = "unifi-python-api", - version = "0.2.2.3", - packages = find_packages('src'), - package_dir = {"": "src"}, - install_requires = [ - 'requests>=2.21.0,<3', - 'trafaret>=1.2.0<1.3', - ], - author='André Carneiro', - author_email='acarneiro.dev@gmail.com', - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Information Technology', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Utilities', - ], -)