diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index cd3a31043..fd1a7c226 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -19,13 +19,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install build twine - name: Build and publish env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.pypi_token }} run: | - python setup.py sdist bdist_wheel + python -m build twine upload dist/* pr_dev_bump: diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..62ccfa1ef --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,27 @@ +# include license files +include LICENSE +recursive-include redbot *.LICENSE + +# include locale files +recursive-include redbot locales/*.po + +# include data folders for cogs +recursive-include redbot/**/data * + +# include *.export files from the test fixtures +recursive-include redbot *.export + +# include the py.typed file informing about Red being typed +recursive-include redbot py.typed + +# include *.sql files from postgres driver +recursive-include redbot/core/drivers/postgres *.sql + +# include tests +graft tests + +# include tox configuration +include tox.ini + +# exclude files containing byte-code and compiled libs +global-exclude *.py[cod] diff --git a/pyproject.toml b/pyproject.toml index 7eb4738da..0f95ce741 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] + requires = ["setuptools", "wheel"] + build-backend = "setuptools.build_meta" + [tool.black] line-length = 99 target-version = ['py38'] diff --git a/setup.cfg b/setup.cfg index 362b2b6be..a1d185d97 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,10 +27,14 @@ classifiers = Operating System :: POSIX :: Linux Programming Language :: Python :: 3.8 Topic :: Communications :: Chat +license_files = + LICENSE + redbot/**/*.LICENSE [options] packages = find_namespace: python_requires = >=3.8.1,<3.9 +include_package_data = True install_requires = aiohttp==3.7.3 aiohttp-json-rpc==0.13.3 @@ -134,14 +138,3 @@ pytest11 = include = redbot redbot.* - -[options.package_data] -* = - locales/*.po - **/locales/*.po - data/* - data/**/* - *.export - py.typed -redbot.core.drivers.postgres = - *.sql