Skip to content

Commit

Permalink
CORRECT-VERSION: 0.6.1 (was: 0.4.1)
Browse files Browse the repository at this point in the history
* Add "pyproject.toml", will be needed in the future.
* tasks: Use invoke-cleanup from repo (instead of using a copy)
* tasks: Remove old stuff
  • Loading branch information
jenisys committed Sep 26, 2024
1 parent e2187e6 commit ec81338
Show file tree
Hide file tree
Showing 14 changed files with 210 additions and 608 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Changed
- [Python] Reuse the action cucumber/action-publish-pypi in release ([#147](https://github.com/cucumber/tag-expressions/pull/147))
- [Python] Correct version to `6.1.0` (was: `4.1.0`)
- [Ruby] Fixed up remaining simple cops and began to reduce complexity of code ([#158](https://github.com/cucumber/tag-expressions/pull/158))

## [6.1.0] - 2024-01-10
Expand Down
25 changes: 0 additions & 25 deletions python/.envrc.use_pep0582.disabled

This file was deleted.

2 changes: 1 addition & 1 deletion python/cucumber_tag_expressions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
from __future__ import absolute_import
from .parser import parse, TagExpressionParser, TagExpressionError

__version__ = "4.1.0"
__version__ = "6.1.0"
1 change: 1 addition & 0 deletions python/py.requirements/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
# ============================================================================

enum34; python_version < '3.4'
setuptools
145 changes: 145 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# =============================================================================
# PACKAGING: cucumber-tag-expressions
# =============================================================================
# SEE: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
# SEE: https://pypi.org/classifiers/
# MAYBE: requires = ["setuptools", "setuptools-scm"]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"


[project]
name = "cucumber-tag-expressions"
dynamic = ["version"]
description = "Provides a tag-expression parser and evaluation logic for cucumber/behave"
readme = "README.rst"
authors = [
{ name="Jens Engel", email="jenisys@users.noreply.github.com" },
]
dependencies = [
"enum34; python_version < '3.4'",
]
keywords= ["BDD", "testing", "tag-expressions", "cucumber", "behave"]
# source-includes = [
# "tests/",
# "py.requirements/",
# ".bumbversion.cfg",
# ".coveragerc",
# ".editorconfig",
# ".envrc",
# ".pylintrc",
# "LICENSE",
# "Makefile",
# "**/*.cfg",
# "**/*.in",
# "**/*.ini",
# "**/*.mk",
# "**/*.toml",
# "**/*.yaml",
# "**/*.yml",
# "**/*.rst",
# "**/*.txt",
# ]
requires-python = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*"
# requires-python = ">=3.7"
license = { text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Acceptance",
"Topic :: Software Development :: Testing :: BDD",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]


[project.urls]
homepage = "https://github.com/cucumber/tag-expressions"
repository = "https://github.com/cucumber/tag-expressions"
download = "https://pypi.org/project/cucumber-tag-expressions"
documentation = "https://cucumber.io/docs/cucumber/api/#tag-expressions"
changelog = "https://github.com/cucumber/tag-expressions/blob/main/CHANGELOG.md"
"Issue Tracker" = "https://github.com/cucumber/tag-expressions/issues/"


[project.optional-dependencies]
testing = [
"pytest < 5.0; python_version < '3.0'", # >= 4.2
"pytest >= 5.0; python_version >= '3.0'",
"pytest-html >= 1.19.0,<2.0; python_version < '3.0'",
"pytest-html >= 2.0; python_version >= '3.0'",
]
develop = [
"pytest < 5.0; python_version < '3.0'", # >= 4.2
"pytest >= 5.0; python_version >= '3.0'",
"pytest-html >= 1.19.0",
"pytest-cov",
"coverage >= 5.0.3",
"tox >=4.20,<4.21",
"pylint",
"ruff",

# -- INVOKE SUPPORT: ----------------------------------
# HINT: path.py => path (python-install-package was renamed for python3)
"invoke >= 1.4.1",
"six >= 1.15.0",
"invoke-cleanup @ git+https://github.com/jenisys/invoke-cleanup@v0.3.7",
"path >= 13.1.0; python_version >= '3.5'",
"path.py == 11.5.2; python_version < '3.5'",

# -- PYTHON2 BACKPORTS:
"pathlib; python_version <= '3.4'",
"backports.shutil_which; python_version <= '3.3'",
# -- CLEANUP SUPPORT: py.cleanup
"pycmd",
]


[tool.distutils.bdist_wheel]
universal = true


# -----------------------------------------------------------------------------
# PACAKING TOOL SPECIFIC PARTS:
# -----------------------------------------------------------------------------
[tool.setuptools]
platforms = ["any"]
zip-safe = true

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

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


# =============================================================================
# OTHER TOOLS
# =============================================================================
[tool.pylint.messages_control]
disable = "C0330, C0326"

[tool.pylint.format]
max-line-length = "100"
33 changes: 19 additions & 14 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,32 +63,34 @@ def find_packages_by_root_package(where):
include_package_data = True,

# -- REQUIREMENTS:
python_requires=">=2.7",
# SUPPORT: python2.7, python3.5 (or higher)
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
install_requires=[
"enum34; python_version < '3.4'"
],
tests_require=[
"pytest <8.4; python_version < '3.0'",
"pytest >= 5.0; python_version >= '3.0'",
"pytest-html >=4,<4.2; python_version < '3.0'",
"pytest-html >= 2.0; python_version >= '3.0'",
"PyYAML >= 5.4.1",
"pathlib; python_version <= '3.4'",
],
# tests_require=[
# "pytest < 5.0; python_version < '3.0'",
# "pytest >= 5.0; python_version >= '3.0'",
# "pytest-html >= 1.19.0,<2.0; python_version < '3.0'",
# "pytest-html >= 2.0; python_version >= '3.0'",
# "PyYAML >= 5.4.1",
# "pathlib; python_version <= '3.4'",
# ],
extras_require={
# PREPARED: 'docs': ["sphinx>=1.5"],
"develop": [
"coverage",
"pytest <8.4; python_version < '3.0'",
"pytest < 5.0; python_version < '3.0'",
"pytest >= 5.0; python_version >= '3.0'",
"pytest-html >=4,<4.2; python_version < '3.0'",
"pytest-html >= 1.19.0,<2.0; python_version < '3.0'",
"pytest-html >= 2.0; python_version >= '3.0'",
"tox >=4.20,<4.21",
"pylint",
"ruff",
# -- INVOKE SUPPORT:
"invoke >= 1.7.3",
"six >= 1.16.0",
"invoke-cleanup @ git+https://github.com/jenisys/invoke-cleanup@v0.3.7",
"path >= 13.1.0; python_version >= '3.5'",
"path.py >= 11.5.0; python_version < '3.5'",
# PYTHON2 BACKPORTS:
Expand All @@ -98,10 +100,8 @@ def find_packages_by_root_package(where):
"pycmd",
],
},

test_suite = "tests",
# test_suite = "tests",
zip_safe = True,

classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
Expand All @@ -113,6 +113,11 @@ def find_packages_by_root_package(where):
"Programming Language :: Python :: 3.5",
"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",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Testing",
Expand Down
10 changes: 7 additions & 3 deletions python/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from . import _setup # pylint: disable=wrong-import-order
import os.path
import sys

INVOKE_MINVERSION = "1.2.0"
_setup.setup_path()
_setup.require_invoke_minversion(INVOKE_MINVERSION)
Expand All @@ -28,16 +29,20 @@
TOPDIR = os.path.abspath(TOPDIR)
sys.path.insert(0, TOPDIR)

# -- MONKEYPATCH: path module
from ._path import monkeypatch_path_if_needed
monkeypatch_path_if_needed()


# -----------------------------------------------------------------------------
# IMPORTS:
# -----------------------------------------------------------------------------
import sys
from invoke import Collection

# -- TASK-LIBRARY:
from . import invoke_cleanup as cleanup
import invoke_cleanup as cleanup
from . import test
from . import release

# -----------------------------------------------------------------------------
# TASKS:
Expand All @@ -51,7 +56,6 @@
namespace = Collection()
namespace.add_collection(Collection.from_module(cleanup), name="cleanup")
namespace.add_collection(Collection.from_module(test))
namespace.add_collection(Collection.from_module(release))

cleanup.cleanup_tasks.add_task(cleanup.clean_python)

Expand Down
70 changes: 0 additions & 70 deletions python/tasks/__main__.py

This file was deleted.

Loading

0 comments on commit ec81338

Please sign in to comment.