Skip to content

Commit

Permalink
Merge pull request #17 from ofek/modernize-metadata
Browse files Browse the repository at this point in the history
Update package metadata
  • Loading branch information
mariusvniekerk authored Jul 11, 2022
2 parents 3ba76c3 + e02e4f3 commit 7359409
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 158 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,13 @@ jobs:

- name: build
run: |
python -m pip install pip wheel twine setuptools_scm
python setup.py sdist
pip wheel . -w dist --no-deps
python -m pip install build
python -m build
- name: Check files
run: |
ls dist
shell: bash

- name: Test wheels
run: |
python -m twine check dist/*
shell: bash

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*.log
*.pyc
.cache/
.coverage
.coverage*
.idea/
.mypy_cache/
.vscode/
Expand All @@ -18,5 +18,7 @@ pip-wheel-metadata/
rever/
src/golang/ensureconda*
# binaries
ensureconda
ensureconda.exe
/ensureconda
/ensureconda.exe
# Version we ship
src/python/ensureconda/_version.py
11 changes: 0 additions & 11 deletions MANIFEST.in

This file was deleted.

68 changes: 68 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[build-system]
requires = ["hatchling>=0.21.1", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "ensureconda"
description = "Lightweight bootstrapper for a conda executable"
readme = "README.md"
license = "MIT"
requires-python = ">=3.7"
authors = [
{ name = "Marius van Niekerk", email = "[email protected]" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"appdirs",
"click>=5.1",
"filelock",
"requests>=2",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/conda-incubator/ensureconda"

[project.scripts]
ensureconda = "ensureconda.cli:ensureconda_cli"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "src/python/ensureconda/_version.py"

[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"/news",
"/src/golang",
"/test",
"/go.mod",
"/go.sum",
"/main.go",
]

[tool.hatch.build.targets.wheel]
packages = ["src/python/ensureconda"]

[tool.pytest]
flake8-max-line-length = 105
flake8-ignore = ["docs/*", "ALL"]

[tool.isort]
not_skip = ["__init__.py"]
profile = "black"
known_first_party = ["ensureconda"]
74 changes: 0 additions & 74 deletions setup.cfg

This file was deleted.

52 changes: 0 additions & 52 deletions setup.py

This file was deleted.

9 changes: 1 addition & 8 deletions src/python/ensureconda/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
import pkg_resources

from ._version import version as __version__
from .api import ensureconda


try:
__version__ = pkg_resources.get_distribution("ensureconda").version
except Exception:
__version__ = "unknown"
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[tox]
isolated_build = true
envlist =
py36,
py37,
py38,
py39,
py310,
pypy3,

[testenv]
develop = true
passenv = *
deps =
coverage
pytest
docker
commands =
python setup.py --quiet clean develop
coverage run --parallel-mode -m pytest
coverage combine --append
coverage report -m

0 comments on commit 7359409

Please sign in to comment.