Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adopt as much of `pyproject.toml` as possible
- Loading branch information
Showing
8 changed files
with
119 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Dist | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
pip install -U pip | ||
pip install tox | ||
- name: Build Distribution | ||
run: | | ||
tox -e dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[build-system] | ||
requires = ["setuptools >= 40.6.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
################################################################################ | ||
[tool.coverage.run] | ||
data_file = ".coverage" | ||
include = [ | ||
"ci_exec/**", | ||
"tests/**", | ||
"demos/**"] | ||
|
||
################################################################################ | ||
[[tool.mypy.overrides]] | ||
module = [ | ||
"pytest", | ||
"pygments", | ||
"setuptools"] | ||
|
||
################################################################################ | ||
[tool.pytest.ini_options] | ||
cache_dir = "tests/.cache" | ||
norecursedirs = [ | ||
".git/", | ||
"docs/", | ||
"ci_exec/"] | ||
python_files = ["tests/**.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,46 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
exclude = | ||
.git | ||
.eggs | ||
.tox | ||
ignore = | ||
# Missing blank line after last section (waste of space...) | ||
D413, | ||
# I document the class, not __init__ | ||
D107, | ||
# Lining up operators is less important than making it easy for users to understand. | ||
W504 | ||
|
||
[tool:pytest] | ||
cache_dir = tests/.cache | ||
norecursedirs = | ||
.git/ | ||
docs/ | ||
ci_exec/ | ||
python_files = | ||
tests/**.py | ||
[metadata] | ||
name = ci_exec | ||
version = attr: ci_exec.__version__ | ||
python_requires = >=3.6 | ||
license = Apache v2.0 | ||
author = Stephen McDowell | ||
author_email = svenevs.pypi@gmail.com | ||
|
||
[coverage:run] | ||
data_file = .coverage | ||
include = | ||
ci_exec/** | ||
tests/** | ||
demos/** | ||
description = | ||
A wrapper package designed for running continuous integration (CI) build steps using | ||
Python 3.6+. | ||
long_description = file: README.rst | ||
long_description_content_type = text/x-rst | ||
|
||
[mypy-setuptools] | ||
ignore_missing_imports = true | ||
url = https://github.com/svenevs/ci_exec | ||
project_urls = | ||
Documentation = https://ci-exec.readthedocs.io/en/latest/ | ||
Source = https://github.com/svenevs/ci_exec | ||
Tracker = https://github.com/svenevs/ci_exec/issues | ||
classifiers = | ||
Development Status :: 3 - Alpha | ||
Intended Audience :: Developers | ||
Topic :: Software Development :: Build Tools | ||
License :: OSI Approved :: Apache Software License | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
|
||
[mypy-pytest] | ||
ignore_missing_imports = true | ||
|
||
[mypy-pygments] | ||
ignore_missing_imports = true | ||
[options] | ||
zip_safe = False | ||
include_package_data = True | ||
packages = find: | ||
|
||
[mypy-youtube] | ||
ignore_missing_imports = true | ||
[options.package_data] | ||
ci_exec = py.typed | ||
|
||
# NOTE: see docs/requirements.txt, this will not be needed in future. | ||
[mypy-sphinx.ext.autodoc] | ||
ignore_missing_imports = true | ||
[options.packages.find] | ||
exclude = | ||
demos | ||
demos.* | ||
docs | ||
docs.* | ||
tests | ||
tests.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,6 @@ | ||
# noqa: D100 | ||
import os | ||
import sys | ||
#!/usr/bin/env python | ||
|
||
from setuptools import find_packages, setup | ||
import setuptools | ||
|
||
|
||
if sys.version_info < (3, 6): | ||
raise RuntimeError("ci_exec needs Python 3.6+") | ||
|
||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | ||
import ci_exec # noqa: E402, I100 | ||
|
||
# Extract the descriptions from README.rst. | ||
try: | ||
in_brief = False | ||
brief = "" | ||
in_long = False | ||
in_final = False | ||
long = "" | ||
with open("README.rst") as readme: | ||
for line in readme: | ||
if line.startswith(".. begin_brief_desc"): | ||
in_brief = True | ||
continue | ||
elif line.startswith(".. end_brief_desc"): | ||
in_brief = False | ||
continue | ||
elif line.startswith(".. begin_long_desc"): | ||
in_long = True | ||
continue | ||
elif line.startswith(".. end_long_desc"): | ||
in_long = False | ||
continue | ||
elif line.startswith(".. begin_final_desc"): | ||
in_final = True | ||
continue | ||
elif line.startswith(".. end_final_desc"): | ||
in_final = False | ||
continue | ||
|
||
if in_brief: | ||
brief += line.replace("\n", " ") # so it is all on one line. | ||
elif in_long: | ||
long += line | ||
elif in_final: | ||
long += line | ||
|
||
if not brief: | ||
raise RuntimeError("Internal error: could not extract brief description.") | ||
if not long: | ||
raise RuntimeError("Internal error: could not extract long description.") | ||
except Exception as e: | ||
raise RuntimeError(f"CRITICAL: {e}") | ||
|
||
brief_description = brief.rstrip() | ||
long_description = long.rstrip() | ||
|
||
setup( | ||
name="ci_exec", | ||
version=ci_exec.__version__, | ||
requires_python=">=3.6", | ||
author="Stephen McDowell", | ||
author_email="svenevs.pypi@gmail.com", | ||
license="Apache v2.0", | ||
description=brief_description, | ||
long_description=long_description, | ||
long_description_content_type="text/x-rst", | ||
project_urls={ | ||
"Documentation": "https://ci-exec.readthedocs.io/en/latest/", | ||
"Source": "https://github.com/svenevs/ci_exec" | ||
}, | ||
url="https://github.com/svenevs/ci_exec", | ||
packages=find_packages(exclude=[ | ||
"demos", "demos.*", | ||
"docs", "docs.*", | ||
"tests", "tests.*", | ||
]), | ||
package_data={"ci_exec": ["py.typed"]}, | ||
include_package_data=True, | ||
zip_safe=False, | ||
python_requires=">=3.6", | ||
classifiers=[ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Build Tools", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9" | ||
] | ||
) | ||
if __name__ == "__main__": | ||
setuptools.setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters