diff --git a/.coveragerc b/.coveragerc index 2332963..31eaaef 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,4 @@ [run] omit = - port_for/_download_ranges.py - port_for/docopt.py + src/port_for/_download_ranges.py + src/port_for/docopt.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79c1444..6e8f64e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,9 +17,9 @@ jobs: with: python-version: 3.9 - name: Install build tools - run: pip install pep517 + run: pip install build - name: Build a wheel package - run: python -m pep517.build . + run: python -m build . - name: Install twine to check the package run: pip install twine - name: Check the package diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 7fc49c6..9db1a52 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -32,7 +32,7 @@ jobs: pip install -r requirements-lint.txt - name: Run pydocstyle run: | - pydocstyle port_for/ tests/ + pydocstyle src/ tests/ pycodestyle: runs-on: ubuntu-latest @@ -51,7 +51,7 @@ jobs: pip install -r requirements-lint.txt - name: Run pydocstyle run: | - pycodestyle port_for/ tests/ + pycodestyle src/ tests/ black: runs-on: ubuntu-latest @@ -77,4 +77,4 @@ jobs: pip install -r requirements-lint.txt - name: Run mypy run: | - mypy port_for/ tests/ scripts/port-for + mypy src/port_for/ tests/ scripts/port-for diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index eb14260..8328230 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -14,9 +14,9 @@ jobs: with: python-version: 3.9 - name: Install build tools - run: pip install pep517 + run: pip install build - name: Build a wheel package - run: python -m pep517.build . + run: python -m build . # - name: Publish distribution 📦 to Test PyPI # uses: pypa/gh-action-pypi-publish@master # with: diff --git a/setup.cfg b/setup.cfg index fc6c73e..67b951a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,53 @@ -[bdist_wheel] -universal=1 +[metadata] +name = port-for +version = 0.5.0 +url = https://github.com/kmike/port-for/ +description = Utility that helps with local TCP ports management. It can find an unused TCP localhost port and remember the association. +long_description = file: README.rst, CHANGES.rst +long_description_content_type = text/x-rst +keywords = port, posix +license = MIT license +author = Mikhail Korobov +author_email = kmike84@gmail.com +maintainer = Grzegorz Śliwiński +maintainer_email = fizyk+pypi@fizyk.net.pl +classifiers = + Development Status :: 4 - Beta + Intended Audience :: Developers + Intended Audience :: System Administrators + License :: OSI Approved :: MIT License + Programming Language :: Python + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Operating System :: POSIX + Topic :: System :: Installation/Setup + Topic :: System :: Systems Administration + Topic :: Internet :: WWW/HTTP :: Site Management + +[options] +zip_safe = False +include_package_data = True +python_requires = >= 3.6 +packages = find: +package_dir = + =src +scripts = + scripts/port-for + +[options.packages.find] +where = src + +[options.extras_require] +tests = + pytest + pytest-cov + mock + +[options.package_data] +port_for = py.typed [pycodestyle] max-line-length = 80 @@ -10,7 +58,7 @@ ignore = D203,D212 match = '(?!docs|build|venv).*\.py' [tool:pytest] -addopts = -vvv --capture=no --showlocals --cov port_for --cov tests --ignore port_for/_download_ranges.py +addopts = -vvv --capture=no --showlocals --cov src/port_for --cov tests --ignore src/port_for/_download_ranges.py testpaths = tests/ filterwarnings = error xfail_strict = True \ No newline at end of file diff --git a/setup.py b/setup.py index 15865c0..2598061 100755 --- a/setup.py +++ b/setup.py @@ -2,35 +2,4 @@ from setuptools import setup -setup( - name="port-for", - version="0.5.0", - author="Mikhail Korobov", - author_email="kmike84@gmail.com", - packages=["port_for"], - scripts=["scripts/port-for"], - url="https://github.com/kmike/port-for/", - license="MIT license", - description="""Utility that helps with local TCP ports management. - It can find an unused TCP localhost port and remember the association.""", - long_description=open("README.rst").read(), - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Operating System :: POSIX", - "Topic :: System :: Installation/Setup", - "Topic :: System :: Systems Administration", - "Topic :: Internet :: WWW/HTTP :: Site Management", - ], - python_requires=">=3.6", - zip_safe=False, - package_data={"port_for": ["py.typed"]}, -) +setup() diff --git a/port_for/__init__.py b/src/port_for/__init__.py similarity index 100% rename from port_for/__init__.py rename to src/port_for/__init__.py diff --git a/port_for/_download_ranges.py b/src/port_for/_download_ranges.py similarity index 100% rename from port_for/_download_ranges.py rename to src/port_for/_download_ranges.py diff --git a/port_for/_ranges.py b/src/port_for/_ranges.py similarity index 100% rename from port_for/_ranges.py rename to src/port_for/_ranges.py diff --git a/port_for/api.py b/src/port_for/api.py similarity index 100% rename from port_for/api.py rename to src/port_for/api.py diff --git a/port_for/docopt.py b/src/port_for/docopt.py similarity index 100% rename from port_for/docopt.py rename to src/port_for/docopt.py diff --git a/port_for/ephemeral.py b/src/port_for/ephemeral.py similarity index 100% rename from port_for/ephemeral.py rename to src/port_for/ephemeral.py diff --git a/port_for/exceptions.py b/src/port_for/exceptions.py similarity index 100% rename from port_for/exceptions.py rename to src/port_for/exceptions.py diff --git a/port_for/py.typed b/src/port_for/py.typed similarity index 100% rename from port_for/py.typed rename to src/port_for/py.typed diff --git a/port_for/store.py b/src/port_for/store.py similarity index 100% rename from port_for/store.py rename to src/port_for/store.py diff --git a/port_for/utils.py b/src/port_for/utils.py similarity index 100% rename from port_for/utils.py rename to src/port_for/utils.py