Skip to content
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

Update pyproject.toml #16

Merged
merged 2 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Tweak pyproject.toml
- Move over to Flit (for simpler sdist building)
- Rename `dev` optional dependency to `test`
- Add a `lint` optional dependency
- Add `keywords`
- Fix `license`
- Update `noxfile.py` to use `pyproject.toml` for installing dev dependencies
  • Loading branch information
brettcannon committed Mar 7, 2023
commit ef346e80fe4d91b30f3efff6e7beb4968d1b5cec
6 changes: 1 addition & 5 deletions microvenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def create(venv_dir):
)


def main():
if __name__ == "__main__":
if len(sys.argv) > 2:
print("Usage: microvenv.py [venv_dir='.venv']", file=sys.stderr)
sys.exit(1)
Expand All @@ -67,7 +67,3 @@ def main():
venv_dir = ".venv"

create(pathlib.Path(venv_dir))

if __name__ == "__main__":
main()

4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
def test(session):
session.install("pytest") # XXX: get from pyproject.toml
session.install(".[test]")
session.run("pytest")


@nox.session
def lint(session):
session.install("black", "ruff") # XXX: get from pyproject.toml
session.install(".[lint]")
session.run("ruff", "check", ".")
session.run("black", "--check", ".")
28 changes: 13 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "microvenv"
version = "0.1.0"
description = "A minimal re-implementation of Python's venv module."
version = "2023.0.0"
description = "A minimal re-implementation of Python's venv module"
keywords = ["virtual environments", "venv"]
readme = "README.md"
license = "MIT"
maintainers = [ { name = "Brett Cannon", email = "brett@python.org" } ]
authors = [ { name = "Brett Cannon", email = "brett@python.org" } ]
license = { file = "LICENSE" }
maintainers = [{ name = "Brett Cannon", email = "brett@python.org" }]
authors = [{ name = "Brett Cannon", email = "brett@python.org" }]
requires-python = ">=3.7"
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development",
"Topic :: Utilities",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
Expand All @@ -28,14 +29,11 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development",
"Topic :: Utilities",
]

[project.optional-dependencies]
dev = [
"pytest>=7.2.2",
]
test = ["pytest"]
lint = ["black", "ruff"]

[project.urls]
source = "https://github.com/brettcannon/microvenv"