diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3cefc8..828d169 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,12 +17,12 @@ jobs: with: python-version: 3.8 - run: | - python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade pip setuptools wheel build python -m pip install -e . - run: | python -m pip install flake8 flake8 --ignore=E501 . - - run: python setup.py sdist bdist_wheel + - run: python -m build . docs: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index fb11f00..8cd45aa 100644 --- a/Makefile +++ b/Makefile @@ -10,5 +10,5 @@ clean: .PHONY: release release: clean - python setup.py sdist bdist_wheel + python3 -m build . twine upload dist/* diff --git a/dev-requirements.txt b/dev-requirements.txt index f95dd78..2fe8bb5 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -6,3 +6,4 @@ pytest-cov pytest-mock codecov sphinx==3.2.0 +build==0.8.0 diff --git a/pyproject.toml b/pyproject.toml index 4395312..fa8b621 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,15 @@ [build-system] requires = ["setuptools", "wheel"] # PEP 508 specifications. +build-backend = "setuptools.build_meta" [tool.black] -line-length = 119 \ No newline at end of file +line-length = 119 + +[flake8] +max-line-length = 88 + +[bdist_wheel] +universal = 1 + +[doc8] +max-line-length=119 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index ac2d91c..154b1bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,48 @@ -[bdist_wheel] -universal = 1 +[metadata] +name = ssdpy +version = attr: ssdpy.version.VERSION +description = Python SSDP library +long_description = file: README.md +long_description_content_type = text/markdown +license = MIT +author = Moshi Binyamini +author_email = moshi@moshib.in +url = https://github.com/MoshiBin/ssdpy +project_urls = + Documentation = https://ssdpy.readthedocs.io/ + Issue Tracker = https://github.com/MoshiBin/ssdpy/issues +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + License :: OSI Approved :: MIT License + Operating System :: OS Independent + Topic :: System :: Networking + Topic :: Software Development :: Libraries :: Python Modules -[doc8] -max-line-length=119 +[options] +zip_safe = False +include_package_data = True +packages = find: +python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<4 +install_requires = setuptools >= 45.2.0 + +[options.packages.find] +exclude = + tests + +[options.extras_require] +test = + pytest >= 3.0.0 + +[options.entry_points] +console_scripts = + ssdpy-server = ssdpy.cli.server:main + ssdpy-discover = ssdpy.cli.client:main diff --git a/setup.py b/setup.py deleted file mode 100644 index 22f9553..0000000 --- a/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup, find_packages -from ssdpy.version import VERSION - -with open("README.md", "r") as fh: - long_description = fh.read() - -setup( - name="ssdpy", - version=VERSION, - long_description=long_description, - long_description_content_type="text/markdown", - description="Python SSDP library", - license="MIT", - author="Moshi Binyamini", - author_email="moshi@moshib.in", - url="https://github.com/MoshiBin/ssdpy", - packages=find_packages(exclude=["tests"]), - python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<4", - entry_points={ - "console_scripts": [ - "ssdpy-server = ssdpy.cli.server:main", - "ssdpy-discover = ssdpy.cli.client:main", - ] - }, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Topic :: System :: Networking", - "Topic :: Software Development :: Libraries :: Python Modules", - ], - -)