Skip to content

Commit

Permalink
Move package definition into setup.cfg file
Browse files Browse the repository at this point in the history
Move source code to src

Update build tools
  • Loading branch information
fizyk committed May 31, 2021
1 parent 5aee52c commit 9eabfc2
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linters.yml
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yml
Expand Up @@ -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:
Expand Down
54 changes: 51 additions & 3 deletions 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
Expand All @@ -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
33 changes: 1 addition & 32 deletions setup.py
Expand Up @@ -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()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9eabfc2

Please sign in to comment.