Skip to content

Commit

Permalink
Put dependencies/package information in pyproject.toml instead of set…
Browse files Browse the repository at this point in the history
…up.cfg (PEP621) (#2336)

* Add PEP621 format toml file

Add PEP621 format toml file

* Add pep621_pyproject.toml

Add pep621_pyproject.toml

* This TOML file complies with PEP517 & PEP518 & PEP621

This link is for the PYPI package generated by this TOML file.

* https://pypi.org/project/locust-je-test-pep621/2.15.2.dev8/

I don't want to overwrite old pyproject.toml so i call this file pep621_pyproject.toml

* Remove duplicate zip_safe

Remove duplicate zip_safe

* Pull #2337 and add pep621 to pyproject.toml

Pull #2337 and add pep621 to pyproject.toml

* Remove duplicate setuptools_scm on build system requires & old pyproject

Remove duplicate setuptools_scm on build system requires & old pyproject

* Fix license text using license file too

from license = { file = "LICENSE"}
to license = { text = "MIT"}

because we have this options
license-files = ["LICENSE"]

* Delete setup.cfg & setup.py

Delete setup.cfg & setup.py

* Replace 'setup.cfg' with 'pyproject.toml'

Replace 'setup.cfg' with 'pyproject.toml'

* Replace rm -f dist/* && python3 setup.py sdist bdist_wheel to rm -f dist/* && python3 -m build .

Replace
rm -f dist/* && python3 setup.py sdist bdist_wheel
to
 rm -f dist/* && python3 -m build .

* Nuke examples\vagrant\vagrant.sh and add pip upgrade build on Makefile

Nuke examples\vagrant\vagrant.sh and
add pip upgrade build on Makefile
  • Loading branch information
JE-Chen authored Apr 14, 2023
1 parent 9c0337d commit 908c414
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.cfg') }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }}
- name: set full Python version in PY env var
# See https://pre-commit.com/#github-actions-example
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ test:
tox

build:
rm -f dist/* && python3 setup.py sdist bdist_wheel
rm -f dist/* && python3 -m pip install --upgrade build && python3 -m build .

release: build
twine upload dist/*
Expand Down
18 changes: 0 additions & 18 deletions examples/vagrant/vagrant.sh

This file was deleted.

91 changes: 89 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,97 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
requires = ["setuptools>=61", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "locust"
license = { text = "MIT"}
description = "Developer friendly load testing framework"
dynamic = ["version"]
requires-python = ">=3.7"
dependencies = [
"gevent >=20.12.1",
"flask >=2.0.0",
"Werkzeug >=2.0.0",
"requests >=2.23.0",
"msgpack >=0.6.2",
"pyzmq >=22.2.1, !=23.0.0",
"geventhttpclient >=2.0.2",
"ConfigArgParse >=1.0",
"psutil >=5.6.7",
"Flask-BasicAuth >=0.2.0",
"Flask-Cors >=3.0.10",
"roundrobin >=0.0.2",
"typing-extensions >=3.7.4.3", # This provides support for @final, @runtime_checkable, Protocol and TypedDict, and can probably be removed once we drop 3.7 support
"pywin32;platform_system=='Windows'",
]
classifiers = [
"Topic :: Software Development :: Testing :: Traffic Generation",
"Development Status :: 5 - Production/Stable",
"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",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Testing :: Traffic Generation",
"Topic :: System :: Distributed Computing",
]

[project.urls]
Homepage = "https://locust.io/"
Documentation = "https://docs.locust.io/"
Code = "https://github.com/locustio/locust"
"Help/Questions" = "https://stackoverflow.com/questions/tagged/locust"
"Issue tracker" = "https://github.com/locustio/locust/issues"


[project.readme]
file = "README.md"
content-type = "text/markdown"

[tool.setuptools]
zip-safe = false
license-files = ["LICENSE"]
include-package-data = false

[tool.black]
line-length = 120

[tool.setuptools_scm]
write_to = "locust/_version.py"
local_scheme = "no-local-version"
local_scheme = "no-local-version"

[options.packages.find]
namespace = true
include = ["locust*"]
exclude = [
"examples",
"tests",
]

[tool.setuptools.package-data]
locust = ["py.typed"]
"locust.static" = ["**/*"]
"locust.templates" = ["**/*"]

[project.scripts]
locust = "locust.main:main"

[tool.mypy]
# missing type stubs
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["requests.*"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["locust.dispatch"]
no_strict_optional = true

79 changes: 0 additions & 79 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

0 comments on commit 908c414

Please sign in to comment.