diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d72f493..2729f5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,7 @@ name: "Peony CI" on: push: - branches: [ master ] pull_request: - branches: [ master ] jobs: build: @@ -12,18 +10,18 @@ jobs: strategy: matrix: python-version: - - '3.6' - - '3.7' - '3.8' - '3.9' - '3.10' + - '3.11' + - '3.12' steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: pip install --upgrade -r tests_requirements.txt wheel + run: pip install --upgrade -e '.[tests]' build - name: Check codestyle run: flake8 - name: Check typing @@ -33,4 +31,4 @@ jobs: - name: Codecov uses: codecov/codecov-action@v1 - name: Build package - run: python3 setup.py sdist bdist_wheel + run: python3 -m build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95bcee5..e60926f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,16 +10,16 @@ jobs: strategy: matrix: python-version: - - '3.9' + - '3.12' steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: pip install --upgrade wheel + run: pip install --upgrade build - name: Build package - run: python3 setup.py sdist bdist_wheel + run: python3 -m build - name: Publish package if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/twitter.yml b/.github/workflows/twitter.yml index 4a8090e..1bbd34c 100644 --- a/.github/workflows/twitter.yml +++ b/.github/workflows/twitter.yml @@ -15,7 +15,7 @@ jobs: with: # only need to test one version, as this test tries to find out if # Twitter's endpoints are still working as expected - python-version: '3.9' + python-version: '3.12' - name: Install dependencies run: pip install --upgrade -r tests_requirements.txt - name: Run tests diff --git a/peony/__init__.py b/peony/__init__.py index 88643a3..e2fea08 100644 --- a/peony/__init__.py +++ b/peony/__init__.py @@ -4,20 +4,12 @@ peony-twitter =============== - An asynchronous Twitter API client for Python 3.6+ + An asynchronous Twitter API client for Python 3.8+ """ -__author__ = "Florian Badie" -__author_email__ = "florianbadie@gmail.com" -__url__ = "https://github.com/odrling/peony-twitter" - __version__ = "3.0.0" -__license__ = "MIT License" - -__keywords__ = "twitter, asyncio, asynchronous" - import logging logger = logging.getLogger(__name__) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e1fbd1d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,64 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "peony-twitter" +dynamic = ["version"] +description = "An asynchronous Twitter API client for Python 3.8+" +readme = "README.rst" +license = "MIT License" +requires-python = ">=3.8" +authors = [ + { name = "odrling", email = "florianbadie@odrling.xyz" }, +] +keywords = [ + "asynchronous", + "asyncio", + "twitter", +] +dependencies = [ + "aiohttp>=2.0,<4.0", + "async-timeout", +] + +[project.optional-dependencies] +aiofiles = [ + "aiofiles", +] +aiohttp = [ + "aiodns", + "cchardet", +] +all = [ + "aiodns", + "aiofiles", + "cchardet", + "python-magic", + "python-magic-bin; platform_system == 'Windows'", +] +magic = [ + "python-magic", + "python-magic-bin; platform_system == 'Windows'", +] +media = [ + "aiofiles", + "python-magic", + "python-magic-bin; platform_system == 'Windows'", +] +tests = [ + "pytest", +] + +[project.urls] +Homepage = "https://github.com/odrling/peony-twitter" +Repository = "https://github.com/odrling/peony-twitter.git" +Issues = "https://github.com/odrling/peony-twitter/issues" + +[tool.hatch.version] +path = "peony/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/peony", +] diff --git a/tox.ini b/tox.ini index ea7ddff..1d2fbee 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35,py36,py37,py38,py39 +envlist = py38,py39,py310,py311,py312 [testenv] deps = -rtests_requirements.txt commands =