diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 450dee107..000000000 --- a/.coveragerc +++ /dev/null @@ -1,6 +0,0 @@ -[run] -branch = True -include = - invoke/* - tests/* -omit = invoke/vendor/* diff --git a/.gitignore b/.gitignore index 4e47c3533..f2cc7ca16 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ dist/ .tox *.egg-info *.py[cod] -src/ htmlcov coverage.xml .cache diff --git a/MANIFEST.in b/MANIFEST.in index ba413a3b6..7356532b0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,7 +4,6 @@ include tasks.py recursive-include invoke/completion * recursive-include sites * recursive-exclude sites/*/_build * -include dev-requirements.txt recursive-include tests * recursive-exclude * *.pyc *.pyo recursive-exclude **/__pycache__ * diff --git a/dev-requirements.txt b/dev-requirements.txt deleted file mode 100644 index 7ff385a9a..000000000 --- a/dev-requirements.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Install self before invocations to save a bit of time --e . -# Invocations, for all sorts of things -invocations>=3.0.1 -# Coverage! -coverage>=6.2,<7 -codecov==2.1.12 -# Docs -releases>=2 -alabaster==0.7.12 -# Testing -pytest-relaxed>=2 -pytest-cov>=4 -# Formatting -# Flake8 5.x seems to have an odd importlib-metadata incompatibility? -flake8>=4,<5 -black>=22.8,<22.9 -# Packaging -setuptools>56 -# Debuggery -icecream>=2.1 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..fa55966b1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,115 @@ +[build-system] +requires = ["setuptools>=51.0.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "invoke" +version = "2.0.0" +description = "Pythonic task execution" +# keywords = ["automation", "task runner"] +authors = [{name="Jeff Forcier", email="jeff@bitprophet.org"}] +maintainers = [{name="Jeff Forcier", email="jeff@bitprophet.org"}] +requires-python = ">=3.6.2" +readme = "README.rst" +license = {file = "LICENSE"} +classifiers=[ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: BSD License", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "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", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Software Development", + "Topic :: Software Development :: Build Tools", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Software Distribution", + "Topic :: System :: Systems Administration", +] + +[project.optional-dependencies] +dev = [ + # Invocations, for all sorts of things + "invocations>=3.0.1", + # Coverage! + "coverage[toml]>=6.2,<7", + "codecov==2.1.12", + # Docs + "releases>=2", + "alabaster==0.7.12", + # Testing + "tox>=3.20.1", + "pytest>=7", + "pytest-relaxed>=2", + "pytest-cov>=4", + # Linting + "pylint>=2.9.5", + # Formatting + # Flake8 5.x seems to have an odd importlib-metadata incompatibility? + "flake8>=4,<5", + "isort>=5.10.1", + "black>=22.8,<22.9", + # Debuggery + "icecream>=2.1", + # Publish + "twine>=1.15", +] + +[project.scripts] +invoke = "invoke.main:program.run" +inv = "invoke.main:program.run" + +[project.urls] +homepage = "http://www.pyinvoke.org/" +changelog = "https://www.pyinvoke.org/changelog.html" +documentation = "https://docs.pyinvoke.org" +repository = "https://github.com/pyinvoke/invoke" +issues = "https://github.com/pyinvoke/invoke/issues" +ci = "https://app.circleci.com/pipelines/github/pyinvoke/invoke" + +[tool.isort] +profile = "black" +line_length = 79 + +[tool.black] +line-length = 79 +include = '\.pyi?$' +exclude = ''' +( + /( + | \.eggs + | \.git + | \.tox + | \.pytest_cache + | _build + | buck-out + | build + | dist + | vendor + ) +) +''' + +[tool.pytest.ini_options] +testpaths = ["tests"] +python_files = "*" +# addopts = "--doctest-modules" + +[tool.coverage] +branch = true +include = [ + "src/invoke/*", + "tests/*", +] +omit = "src/invoke/vendor/*" diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index f51e190a1..000000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -testpaths = tests -python_files = * diff --git a/setup.py b/setup.py deleted file mode 100644 index 1786a5994..000000000 --- a/setup.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python - -# Support setuptools only, distutils has a divergent and more annoying API and -# few folks will lack setuptools. -from setuptools import setup, find_packages - -# Version info -- read without importing -_locals = {} -with open("invoke/_version.py") as fp: - exec(fp.read(), None, _locals) -version = _locals["__version__"] - -exclude = [] - -# Frankenstein long_description -long_description = """ -{} - -For a high level introduction, including example code, please see `our main -project website `_; or for detailed API docs, see `the -versioned API website `_. -""".format( - open("README.rst").read() -) - - -setup( - name="invoke", - version=version, - description="Pythonic task execution", - license="BSD", - long_description=long_description, - author="Jeff Forcier", - author_email="jeff@bitprophet.org", - url="https://pyinvoke.org", - project_urls={ - "Docs": "https://docs.pyinvoke.org", - "Source": "https://github.com/pyinvoke/invoke", - "Issues": "https://github.com/pyinvoke/invoke/issues", - "Changelog": "https://www.pyinvoke.org/changelog.html", - "CI": "https://app.circleci.com/pipelines/github/pyinvoke/invoke", - }, - python_requires=">=3.6", - packages=find_packages(exclude=exclude), - include_package_data=True, - entry_points={ - "console_scripts": [ - "invoke = invoke.main:program.run", - "inv = invoke.main:program.run", - ] - }, - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: BSD License", - "Operating System :: POSIX", - "Operating System :: Unix", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "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", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Topic :: Software Development", - "Topic :: Software Development :: Build Tools", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Software Distribution", - "Topic :: System :: Systems Administration", - ], -) diff --git a/sites/www/development.rst b/sites/www/development.rst index 55852469c..c28d5bb1b 100644 --- a/sites/www/development.rst +++ b/sites/www/development.rst @@ -10,7 +10,7 @@ follow their instructions for cloning (or forking, then cloning, which is best if you intend to contribute back) the repository there. Once downloaded, install the repo itself + its development dependencies by -running ``pip install -r dev-requirements.txt``. +running ``pip install -e .[dev]``. Submitting bug reports or patches diff --git a/invoke/__init__.py b/src/invoke/__init__.py similarity index 100% rename from invoke/__init__.py rename to src/invoke/__init__.py diff --git a/invoke/__main__.py b/src/invoke/__main__.py similarity index 100% rename from invoke/__main__.py rename to src/invoke/__main__.py diff --git a/invoke/_version.py b/src/invoke/_version.py similarity index 100% rename from invoke/_version.py rename to src/invoke/_version.py diff --git a/invoke/collection.py b/src/invoke/collection.py similarity index 100% rename from invoke/collection.py rename to src/invoke/collection.py diff --git a/invoke/completion/__init__.py b/src/invoke/completion/__init__.py similarity index 100% rename from invoke/completion/__init__.py rename to src/invoke/completion/__init__.py diff --git a/invoke/completion/bash.completion b/src/invoke/completion/bash.completion similarity index 100% rename from invoke/completion/bash.completion rename to src/invoke/completion/bash.completion diff --git a/invoke/completion/complete.py b/src/invoke/completion/complete.py similarity index 100% rename from invoke/completion/complete.py rename to src/invoke/completion/complete.py diff --git a/invoke/completion/fish.completion b/src/invoke/completion/fish.completion similarity index 100% rename from invoke/completion/fish.completion rename to src/invoke/completion/fish.completion diff --git a/invoke/completion/zsh.completion b/src/invoke/completion/zsh.completion similarity index 100% rename from invoke/completion/zsh.completion rename to src/invoke/completion/zsh.completion diff --git a/invoke/config.py b/src/invoke/config.py similarity index 100% rename from invoke/config.py rename to src/invoke/config.py diff --git a/invoke/context.py b/src/invoke/context.py similarity index 100% rename from invoke/context.py rename to src/invoke/context.py diff --git a/invoke/env.py b/src/invoke/env.py similarity index 100% rename from invoke/env.py rename to src/invoke/env.py diff --git a/invoke/exceptions.py b/src/invoke/exceptions.py similarity index 100% rename from invoke/exceptions.py rename to src/invoke/exceptions.py diff --git a/invoke/executor.py b/src/invoke/executor.py similarity index 100% rename from invoke/executor.py rename to src/invoke/executor.py diff --git a/invoke/loader.py b/src/invoke/loader.py similarity index 100% rename from invoke/loader.py rename to src/invoke/loader.py diff --git a/invoke/main.py b/src/invoke/main.py similarity index 100% rename from invoke/main.py rename to src/invoke/main.py diff --git a/invoke/parser/__init__.py b/src/invoke/parser/__init__.py similarity index 100% rename from invoke/parser/__init__.py rename to src/invoke/parser/__init__.py diff --git a/invoke/parser/argument.py b/src/invoke/parser/argument.py similarity index 100% rename from invoke/parser/argument.py rename to src/invoke/parser/argument.py diff --git a/invoke/parser/context.py b/src/invoke/parser/context.py similarity index 100% rename from invoke/parser/context.py rename to src/invoke/parser/context.py diff --git a/invoke/parser/parser.py b/src/invoke/parser/parser.py similarity index 100% rename from invoke/parser/parser.py rename to src/invoke/parser/parser.py diff --git a/invoke/program.py b/src/invoke/program.py similarity index 100% rename from invoke/program.py rename to src/invoke/program.py diff --git a/invoke/runners.py b/src/invoke/runners.py similarity index 100% rename from invoke/runners.py rename to src/invoke/runners.py diff --git a/invoke/tasks.py b/src/invoke/tasks.py similarity index 100% rename from invoke/tasks.py rename to src/invoke/tasks.py diff --git a/invoke/terminals.py b/src/invoke/terminals.py similarity index 100% rename from invoke/terminals.py rename to src/invoke/terminals.py diff --git a/invoke/util.py b/src/invoke/util.py similarity index 100% rename from invoke/util.py rename to src/invoke/util.py diff --git a/invoke/vendor/__init__.py b/src/invoke/vendor/__init__.py similarity index 100% rename from invoke/vendor/__init__.py rename to src/invoke/vendor/__init__.py diff --git a/invoke/vendor/decorator.py b/src/invoke/vendor/decorator.py similarity index 100% rename from invoke/vendor/decorator.py rename to src/invoke/vendor/decorator.py diff --git a/invoke/vendor/fluidity/LICENSE b/src/invoke/vendor/fluidity/LICENSE similarity index 100% rename from invoke/vendor/fluidity/LICENSE rename to src/invoke/vendor/fluidity/LICENSE diff --git a/invoke/vendor/fluidity/__init__.py b/src/invoke/vendor/fluidity/__init__.py similarity index 100% rename from invoke/vendor/fluidity/__init__.py rename to src/invoke/vendor/fluidity/__init__.py diff --git a/invoke/vendor/fluidity/backwardscompat.py b/src/invoke/vendor/fluidity/backwardscompat.py similarity index 100% rename from invoke/vendor/fluidity/backwardscompat.py rename to src/invoke/vendor/fluidity/backwardscompat.py diff --git a/invoke/vendor/fluidity/machine.py b/src/invoke/vendor/fluidity/machine.py similarity index 100% rename from invoke/vendor/fluidity/machine.py rename to src/invoke/vendor/fluidity/machine.py diff --git a/invoke/vendor/lexicon/LICENSE b/src/invoke/vendor/lexicon/LICENSE similarity index 100% rename from invoke/vendor/lexicon/LICENSE rename to src/invoke/vendor/lexicon/LICENSE diff --git a/invoke/vendor/lexicon/__init__.py b/src/invoke/vendor/lexicon/__init__.py similarity index 100% rename from invoke/vendor/lexicon/__init__.py rename to src/invoke/vendor/lexicon/__init__.py diff --git a/invoke/vendor/lexicon/_version.py b/src/invoke/vendor/lexicon/_version.py similarity index 100% rename from invoke/vendor/lexicon/_version.py rename to src/invoke/vendor/lexicon/_version.py diff --git a/invoke/vendor/lexicon/alias_dict.py b/src/invoke/vendor/lexicon/alias_dict.py similarity index 100% rename from invoke/vendor/lexicon/alias_dict.py rename to src/invoke/vendor/lexicon/alias_dict.py diff --git a/invoke/vendor/lexicon/attribute_dict.py b/src/invoke/vendor/lexicon/attribute_dict.py similarity index 100% rename from invoke/vendor/lexicon/attribute_dict.py rename to src/invoke/vendor/lexicon/attribute_dict.py diff --git a/invoke/vendor/yaml/__init__.py b/src/invoke/vendor/yaml/__init__.py similarity index 100% rename from invoke/vendor/yaml/__init__.py rename to src/invoke/vendor/yaml/__init__.py diff --git a/invoke/vendor/yaml/composer.py b/src/invoke/vendor/yaml/composer.py similarity index 100% rename from invoke/vendor/yaml/composer.py rename to src/invoke/vendor/yaml/composer.py diff --git a/invoke/vendor/yaml/constructor.py b/src/invoke/vendor/yaml/constructor.py similarity index 100% rename from invoke/vendor/yaml/constructor.py rename to src/invoke/vendor/yaml/constructor.py diff --git a/invoke/vendor/yaml/cyaml.py b/src/invoke/vendor/yaml/cyaml.py similarity index 100% rename from invoke/vendor/yaml/cyaml.py rename to src/invoke/vendor/yaml/cyaml.py diff --git a/invoke/vendor/yaml/dumper.py b/src/invoke/vendor/yaml/dumper.py similarity index 100% rename from invoke/vendor/yaml/dumper.py rename to src/invoke/vendor/yaml/dumper.py diff --git a/invoke/vendor/yaml/emitter.py b/src/invoke/vendor/yaml/emitter.py similarity index 100% rename from invoke/vendor/yaml/emitter.py rename to src/invoke/vendor/yaml/emitter.py diff --git a/invoke/vendor/yaml/error.py b/src/invoke/vendor/yaml/error.py similarity index 100% rename from invoke/vendor/yaml/error.py rename to src/invoke/vendor/yaml/error.py diff --git a/invoke/vendor/yaml/events.py b/src/invoke/vendor/yaml/events.py similarity index 100% rename from invoke/vendor/yaml/events.py rename to src/invoke/vendor/yaml/events.py diff --git a/invoke/vendor/yaml/loader.py b/src/invoke/vendor/yaml/loader.py similarity index 100% rename from invoke/vendor/yaml/loader.py rename to src/invoke/vendor/yaml/loader.py diff --git a/invoke/vendor/yaml/nodes.py b/src/invoke/vendor/yaml/nodes.py similarity index 100% rename from invoke/vendor/yaml/nodes.py rename to src/invoke/vendor/yaml/nodes.py diff --git a/invoke/vendor/yaml/parser.py b/src/invoke/vendor/yaml/parser.py similarity index 100% rename from invoke/vendor/yaml/parser.py rename to src/invoke/vendor/yaml/parser.py diff --git a/invoke/vendor/yaml/reader.py b/src/invoke/vendor/yaml/reader.py similarity index 100% rename from invoke/vendor/yaml/reader.py rename to src/invoke/vendor/yaml/reader.py diff --git a/invoke/vendor/yaml/representer.py b/src/invoke/vendor/yaml/representer.py similarity index 100% rename from invoke/vendor/yaml/representer.py rename to src/invoke/vendor/yaml/representer.py diff --git a/invoke/vendor/yaml/resolver.py b/src/invoke/vendor/yaml/resolver.py similarity index 100% rename from invoke/vendor/yaml/resolver.py rename to src/invoke/vendor/yaml/resolver.py diff --git a/invoke/vendor/yaml/scanner.py b/src/invoke/vendor/yaml/scanner.py similarity index 100% rename from invoke/vendor/yaml/scanner.py rename to src/invoke/vendor/yaml/scanner.py diff --git a/invoke/vendor/yaml/serializer.py b/src/invoke/vendor/yaml/serializer.py similarity index 100% rename from invoke/vendor/yaml/serializer.py rename to src/invoke/vendor/yaml/serializer.py diff --git a/invoke/vendor/yaml/tokens.py b/src/invoke/vendor/yaml/tokens.py similarity index 100% rename from invoke/vendor/yaml/tokens.py rename to src/invoke/vendor/yaml/tokens.py diff --git a/invoke/watchers.py b/src/invoke/watchers.py similarity index 100% rename from invoke/watchers.py rename to src/invoke/watchers.py