diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4194b28..2136652 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -30,7 +30,6 @@ jobs: python-version: '3.x' - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install build + python -m pip install poetry - name: Build package - run: python -m build + run: poetry build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ccf23c3 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +build: + poetry build + +publish: + poetry publish + +# poetry config repositories.testpypi https://test.pypi.org/legacy/ +publish-test: + poetry publish -r testpypi diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4565f78 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +[tool.poetry] +name = "django-turbo-response" +version = "1.0.1" +description = "Hotwired/Turbo response helpers for Django" +authors = ["Michael Yin "] +license = "MIT" +homepage = "https://github.com/hotwire-django/django-turbo-response" +readme = "README.md" +packages = [{ include = "turbo_response", from = "src" }] + +[tool.poetry.urls] +Changelog = "https://github.com/hotwire-django/django-turbo-response/releases" + +[tool.poetry.dependencies] +python = ">=3.8" +django = ">=3.0" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = [ + "setuptools >= 61.0.0", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py deleted file mode 100644 index ecb6e40..0000000 --- a/setup.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -from setuptools import find_packages, setup - -VERSION = "1.0.1" - -setup( - name="django-turbo-response", - version=VERSION, - author="Dan Jacob", - author_email="danjac2018@gmail.com", - url="https://github.com/hotwire-django/django-turbo-response", - description="Hotwired/Turbo response helpers for Django", - long_description=open("README.md").read() + "\n\n" + open("CHANGELOG.md").read(), - long_description_content_type="text/markdown", - license="MIT", - python_requires=">=3.8", - requires=["django (>=3.0)"], - packages=find_packages("src"), - package_dir={"": "src"}, - classifiers=[ - "Framework :: Django", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Software Development :: Libraries :: Python Modules", - ], -)