-
Notifications
You must be signed in to change notification settings - Fork 31
Rewrite project build and metadata using pyproject.toml #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+158
−214
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
[build-system] | ||
requires = ["setuptools >= 74.1"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "LNT" | ||
version = "0.4.2.dev0" | ||
description = "LLVM Nightly Test Infrastructure" | ||
readme = "README.md" | ||
license = "LicenseRef-Apache-2.0-with-LLVM-exception" | ||
license-files = ["LICENSE.TXT"] | ||
authors = [ | ||
{ name = "Daniel Dunbar", email = "[email protected]" }, | ||
] | ||
maintainers = [] | ||
keywords = ["web", "testing", "performance", "development", "llvm"] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
ldionne marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Software Development :: Quality Assurance", | ||
"Topic :: Software Development :: Testing", | ||
] | ||
requires-python = ">=3.10" | ||
dependencies = [ | ||
"aniso8601>=1.2.0", | ||
"certifi", | ||
"click>=8.1.0", | ||
"Flask-RESTful>=0.3.10", | ||
"Flask-WTF>=1.2.0", | ||
"Flask>=3.1.0", | ||
"Jinja2>=3.1.0", | ||
"MarkupSafe>=3.0.0", | ||
"python-gnupg>=0.3.7", | ||
"pyyaml>=6.0.0", | ||
ldionne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
"requests", | ||
"SQLAlchemy==1.3.24", | ||
"typing", | ||
"Werkzeug>=3.1.0", | ||
"WTForms>=3.2.0", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://llvm.org" | ||
Documentation = "https://llvm.org/docs/lnt" | ||
Repository = "https://github.com/llvm/llvm-lnt" | ||
"Bug Reports" = "https://github.com/llvm/llvm-lnt/issues" | ||
|
||
[project.scripts] | ||
lnt = "lnt.lnttool:main" | ||
|
||
[project.optional-dependencies] | ||
server = [ | ||
"gunicorn>=19.9.0", | ||
"psycopg2>=2.9.0", | ||
] | ||
dev = [ | ||
"filecheck", | ||
"Flake8-pyproject", | ||
"flake8", | ||
"lit", | ||
"tox", | ||
] | ||
|
||
[tool.setuptools] | ||
ext-modules = [ | ||
{name = "lnt.testing.profile.cPerf", sources = ["lnt/testing/profile/cPerf.cpp"]} | ||
] | ||
|
||
[tool.setuptools.packages] | ||
find = {namespaces = false} | ||
|
||
[tool.setuptools.package-data] | ||
"lnt.server.ui" = [ | ||
"static/*.ico", | ||
"static/*.js", | ||
"static/*.css", | ||
"static/*.svg", | ||
"static/bootstrap/css/*.css", | ||
"static/bootstrap/js/*.js", | ||
"static/bootstrap/img/*.png", | ||
"static/flot/*.min.js", | ||
"static/plotly/*.min.js", | ||
"static/d3/*.min.js", | ||
"static/jquery/**/*.min.js", | ||
"templates/*.html", | ||
"templates/reporting/*.html", | ||
"templates/reporting/*.txt", | ||
] | ||
"lnt.server.db" = [ | ||
"migrations/*.py" | ||
] | ||
|
||
[tool.flake8] | ||
ignore = ["E712", "E402", "E711", "E266", "W605", "E126", "E226", "W504"] | ||
max-line-length = 120 | ||
count = true | ||
|
||
[tool.mypy] | ||
plugins = ["sqlmypy"] | ||
|
||
[tool.tox] | ||
env_list = ["py3", "mypy", "flake8", "docs"] | ||
|
||
[tool.tox.env.py3] | ||
description = "Run the unit tests" | ||
allowlist_externals = ["rm", "lit"] | ||
# TODO: Make it possible to run the tests without pinning down all dependencies | ||
deps = [ | ||
"-r requirements.txt", | ||
".[dev]", | ||
] | ||
commands = [ | ||
["rm", "-rf", "test_run_tmp"], | ||
["lit", "-sv", "tests"], | ||
] | ||
|
||
[tool.tox.env.flake8] | ||
description = "Run linter on the codebase" | ||
deps = [".[dev]"] | ||
commands = [["flake8", "--statistics", "--exclude=./lnt/external/", "./lnt/", "./tests/", "./deployment/"]] | ||
skip_install = true | ||
|
||
[tool.tox.env.mypy] | ||
description = "Typecheck the codebase" | ||
# TODO: Make it possible to install [.dev] dependencies instead | ||
deps = [ | ||
"mypy >= 0.910", | ||
"sqlalchemy-stubs", | ||
"types-certifi", | ||
"types-PyYAML", | ||
] | ||
# The option --no-incremental is currently needed to suppress warnings | ||
# about UpdatedBase when running tests several times. Future versions of | ||
# mypy should be checked to see if it can be removed and not get | ||
# warnings after running tox several times. | ||
commands = [["mypy", "--no-incremental", "--ignore-missing-imports", "lnt"]] | ||
skip_install = true | ||
|
||
[tool.tox.env.docs] | ||
description = "Build the documentation" | ||
deps = [ | ||
"sphinx==7", | ||
"sphinx_bootstrap_theme", | ||
] | ||
allowlist_externals = ["make"] | ||
commands = [["make", "-C", "{toxinidir}/docs/", "html"]] | ||
skip_install = true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we remove the individual COPYs? This will cause unnecessary layers to be invalidated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you just replace the original
COPY requirements*.txt setup.py .
withCOPY requirements*.txt pyproject.toml .
we should still be able to avoid reinstalling all the requirements on every build