Skip to content

Commit

Permalink
chore: use hatchling
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Jun 25, 2022
1 parent 3d27e6a commit e06dc1e
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 128 deletions.
187 changes: 163 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,166 @@
.project
.pydevproject
.idea
*.pyc
__pycache__
.settings/
/dist
/plumbum.egg-info
/plumbum/version.py
/build
*.class
*.ropeproject
*.swp
*~
*.spyder*
*.cache/*
tests/.cache/*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
*,cover
*htmlcov
*.po.new
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
# *.mo - plubmum includes this
*.pot
/*venv*
*.mypy_cache
.eggs
/plumbum/version.py

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Plumbum specifics
*.po.new

/tests/nohup.out
/plumbum/version.py
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ repos:
- id: pyupgrade
args: ["--py36-plus"]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: "v1.20.0"
hooks:
- id: setup-cfg-fmt

- repo: https://github.com/hadialqattan/pycln
rev: v1.2.5
hooks:
Expand All @@ -62,13 +57,6 @@ repos:
args: []
additional_dependencies: [typed-ast, types-paramiko, types-setuptools]

# This wants the .mo files removed
- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
hooks:
- id: check-manifest
stages: [manual]

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
Expand Down
82 changes: 65 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,71 @@
[build-system]
requires = [
"setuptools>=42",
"wheel",
"setuptools_scm[toml]>=3.4.3"
"hatchling",
"hatch-vcs",
]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"

[tool.setuptools_scm]
write_to = "plumbum/version.py"

[project]
name = "plumbum"
description = "Plumbum: shell combinators library"
readme = "README.rst"
author = { name="Tomer Filiba", email="[email protected]" }
license = { file="LICENSE" }
requires-python = ">=3.6"
dynamic = ["version"]
requires = [
"pywin32; platform_system=='Windows' and platform_python_implementation!='PyPy'",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Topic :: Software Development :: Build Tools",
"Topic :: System :: Systems Administration",
]
keywords = [
"path",
"local",
"remote",
"ssh",
"shell",
"pipe",
"popen",
"process",
"execution",
"color",
"cli",
]

[project.optional-dependencies]
dev = [
"paramiko",
"psutil",
"pytest>=6.0",
"pytest-cov",
"pytest-mock",
"pytest-timeout",
]
docs = [
"sphinx>=4.0.0",
"sphinx-rtd-theme>=1.0.0",
]
ssh = [
"paramiko",
]

[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "plumbum/version.py"


[tool.mypy]
Expand All @@ -30,7 +88,6 @@ warn_return_any = false
no_implicit_reexport = true
strict_equality = true


[[tool.mypy.overrides]]
module = ["IPython.*", "pywintypes.*", "win32con.*", "win32file.*", "PIL.*", "plumbum.cmd.*", "ipywidgets.*", "traitlets.*", "plumbum.version"]
ignore_missing_imports = true
Expand All @@ -51,19 +108,10 @@ optional_tests = """
sudo: requires sudo access to run
"""


[tool.isort]
profile = "black"

[tool.check-manifest]
ignore = [
".*",
"docs/**",
"examples/*",
"experiments/*",
"conda.recipe/*",
"CONTRIBUTING.rst",
]


[tool.pylint]
master.py-version = "3.6"
Expand Down
70 changes: 0 additions & 70 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,73 +1,3 @@
[metadata]
name = plumbum
description = Plumbum: shell combinators library
long_description = file: README.rst
long_description_content_type = text/x-rst
url = https://plumbum.readthedocs.io
author = Tomer Filiba
author_email = [email protected]
license = MIT
license_file = LICENSE
platforms = POSIX, Windows
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: MIT License
Operating System :: Microsoft :: Windows
Operating System :: POSIX
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
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
Topic :: Software Development :: Build Tools
Topic :: System :: Systems Administration
keywords =
path,
local,
remote,
ssh,
shell,
pipe,
popen,
process,
execution,
color,
cli
project_urls =
Bug Tracker = https://github.com/tomerfiliba/plumbum/issues
Changelog = https://plumbum.readthedocs.io/en/latest/changelog.html
Source = https://github.com/tomerfiliba/plumbum
provides = plumbum

[options]
packages = find:
install_requires =
pywin32;platform_system=='Windows' and platform_python_implementation!="PyPy"
python_requires = >=3.6

[options.packages.find]
exclude =
tests

[options.extras_require]
dev =
paramiko
psutil
pytest>=6.0
pytest-cov
pytest-mock
pytest-timeout
docs =
Sphinx>=4.0.0
sphinx-rtd-theme>=1.0.0
ssh =
paramiko

[options.package_data]
plumbum.cli = i18n/*/LC_MESSAGES/*.mo

[coverage:run]
branch = True
relative_files = True
Expand Down
Loading

0 comments on commit e06dc1e

Please sign in to comment.