Skip to content

Commit

Permalink
Use setuptools-scm
Browse files Browse the repository at this point in the history
* Use "parse_type/_version.py" as temporary file
* Packaging tweaks: Related to Python 2.7

OTHERWISE:

* REMOVE: bumpversion
* REMOVE: setup.py
  • Loading branch information
jenisys committed Oct 3, 2024
1 parent e0f2a91 commit d58636c
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 221 deletions.
6 changes: 0 additions & 6 deletions .bumpversion.cfg

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.py[cod]

# -- TEMPORARY PYTHON PACKAGE PARTS:
parse_type/_version.py
MANIFEST
*.egg
*.egg-info
Expand Down
33 changes: 33 additions & 0 deletions .repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ===========================================================================
# vcs: Multi-repo configuration
# ===========================================================================
# USAGE:
# vcs --commands # Show available commands
#
# vcs import < .repos
# vcs import --input=.repos
# vcs import --input=https://github.com/jenisys/cxx.simplelog/blob/master/.repos
# vcs import --input=https://github.com/jenisys/cxx.simplelog/blob/master/.rosinstall
# vcs import --shallow --input=.repos
# vcs import lib/ --input=.repos
#
# vcs pull
# vcs status
#
# vcs export --nested # Use branch-name
# vcs export --nested --exact # Use commit-hashes instead of branch-name
# vcs export --nested --exact-with-tags # Use tags or commit-hashes
# vcs export --nested lib/doctest # For a specific path instead of ".".
#
# BAD: vcs-export adds basename of current-directory to repositories.
#
# SEE ALSO:
# * https://github.com/dirk-thomas/vcstool
# ===========================================================================
# REQUIRES: pip install vcstool

repositories:
lib/parse:
type: git
url: https://github.com/r1chardj0n3s/parse.git
version: master
6 changes: 0 additions & 6 deletions .rosinstall

This file was deleted.

8 changes: 0 additions & 8 deletions bin/invoke

This file was deleted.

9 changes: 0 additions & 9 deletions bin/invoke.cmd

This file was deleted.

1 change: 0 additions & 1 deletion parse_type/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
from parse_type.builder import TypeBuilder, build_type_dict

__all__ = ["Cardinality", "TypeBuilder", "build_type_dict"]
__version__ = "0.6.3"
1 change: 1 addition & 0 deletions py.requirements/all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
# ============================================================================

-r basic.txt
-r packaging.txt
-r develop.txt
-r testing.txt
9 changes: 4 additions & 5 deletions py.requirements/develop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
# -- BUILD-SYSTEM SUPPORT: Using invoke
-r ../tasks/py.requirements.txt

# -- PROJECT ADMIN SUPPORT:
bump2version >= 0.5.6

# -- RELEASE MANAGEMENT: Push package to pypi.
build >= 0.5.1
twine >= 1.13.0
wheel
-r packaging.txt

# -- PYTHON2/PYTHON3 COMPATIBILITY:
modernize >= 0.5
Expand All @@ -20,6 +16,9 @@ modernize >= 0.5
typing-extensions; python_version >= '3.8'
typer >= 0.12.5; python_version >= '3.7'

# -- MULTI-REPO TOOL:
vcstool >= 0.3.0

# -- LINTERS:
ruff; python_version >= '3.7'
pylint
Expand Down
17 changes: 17 additions & 0 deletions py.requirements/packaging.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ============================================================================
# PYTHON PACKAGE REQUIREMENTS: packaging support
# ============================================================================
# DESCRIPTION:
# pip install -r <THIS_FILE>
#
# SEE ALSO:
# * http://www.pip-installer.org/
# ============================================================================

# -- PACKAGING SUPPORT:
build >= 0.5.1
setuptools >= 64.0.0; python_version >= '3.5'
setuptools < 45.0.0; python_version < '3.5' # DROP: Python2, Python 3.4 support.
setuptools_scm >= 8.0.0; python_version >= '3.7'
setuptools_scm < 8.0.0; python_version < '3.7'
wheel
30 changes: 20 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# =============================================================================
# PACKAGING: parse_type
# =============================================================================
# SEE: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
# SEE: https://pypi.org/classifiers/
# MAYBE: requires = ["setuptools", "setuptools-scm"]
# SEE ALSO:
# * https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
# * https://setuptools-scm.readthedocs.io/en/latest/usage/
# * https://pypi.org/classifiers/
# =============================================================================
# PYTHON3: requires = ["setuptools>=64", "setuptools_scm>=8", "wheel"]
[build-system]
requires = ["setuptools"]
requires = ["setuptools", "setuptools_scm", "wheel"]
build-backend = "setuptools.build_meta"


Expand All @@ -15,6 +18,7 @@ authors = [
{name = "Jens Engel", email = "jenisys@noreply.github.com"},
]
description = "Simplifies to build parse types based on the parse module"
dynamic = ["version"]
readme = "README.rst"
requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
keywords = ["parse", "parsing"]
Expand Down Expand Up @@ -48,8 +52,6 @@ dependencies = [
"enum34; python_version < '3.4'",
"six >= 1.15",
]
# PREPARED:
dynamic = ["version"]


[project.urls]
Expand All @@ -61,7 +63,11 @@ Download = "https://pypi.org/project/parse_type/"

[project.optional-dependencies]
develop = [
"setuptools",
"setuptools >= 64.0.0; python_version >= '3.5'",
"setuptools < 45.0.0; python_version < '3.5'", # DROP: Python2, Python 3.4 support.
"setuptools_scm >= 8.0.0; python_version >= '3.7'",
"setuptools_scm < 8.0.0; python_version < '3.7'",
"wheel",
"build >= 0.5.1",
"twine >= 1.13.0",
"coverage >= 4.4",
Expand Down Expand Up @@ -97,16 +103,20 @@ universal = true
platforms = ["any"]
zip-safe = true

# -- PREPARED:
[tool.setuptools.dynamic]
version = {attr = "parse_type.__version__"}
# -- DISABLED:
# [tool.setuptools.dynamic]
# version = {attr = "parse_type._version.version"}

[tool.setuptools.packages.find]
where = ["."]
include = ["parse_type*"]
exclude = ["tests*"]
namespaces = false

# -- SETUPTOOLS-SCM: Generate version info from git-tag(s).
[tool.setuptools_scm]
version_file = "parse_type/_version.py"


# =============================================================================
# OTHER TOOLS
Expand Down
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

131 changes: 0 additions & 131 deletions setup.py

This file was deleted.

29 changes: 0 additions & 29 deletions tasks/__main__.py

This file was deleted.

Loading

0 comments on commit d58636c

Please sign in to comment.