-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating the packaging system to
poetry
with pyproject.toml
- Deleted old setup files `requirements.txt`, `setup.cfg`, `setup.py`, `MANIFEST.in` - Added poetry files `poetry.toml`, `pyproject.toml`, `poetry.lock` - Added `.pyenv-version` and `.tool-versions` for `pyenv` and `asdf` - Updated `Makefile`, `CONTRIBUTING.rst`, `tox.ini`
- Loading branch information
Showing
12 changed files
with
884 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
3.11 | ||
3.10 | ||
3.9 | ||
3.8 | ||
pypy3.9-7.3.12 |
This file contains 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,2 @@ | ||
python 3.11 3.10 3.9 3.8 pypy3.9-7.3.12 | ||
|
This file contains 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 |
---|---|---|
|
@@ -61,12 +61,11 @@ Ready to contribute? Here's how to set up `pipreqs` for local development. | |
2. Clone your fork locally:: | ||
|
||
$ git clone [email protected]:your_name_here/pipreqs.git | ||
$ cd pipreqs/ | ||
|
||
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: | ||
3. Pipreqs is developed using Poetry. Refer to the `documentation <https://python-poetry.org/docs/>`_ to install Poetry in your local environment. Next, you should install pipreqs's dependencies:: | ||
|
||
$ mkvirtualenv pipreqs | ||
$ cd pipreqs/ | ||
$ python setup.py develop | ||
$ poetry install --with dev | ||
|
||
4. Create a branch for local development:: | ||
|
||
|
@@ -76,11 +75,11 @@ Ready to contribute? Here's how to set up `pipreqs` for local development. | |
|
||
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: | ||
|
||
$ flake8 pipreqs tests | ||
$ python setup.py test | ||
$ tox | ||
|
||
To get flake8 and tox, just pip install them into your virtualenv. | ||
$ poetry run flake8 pipreqs tests | ||
$ poetry run python -m unittest discover | ||
$ poetry run tox | ||
To test all versions of python using tox you need to have them installed and for this two options are recommended: `pyenv` or `asdf`. | ||
|
||
6. Commit your changes and push your branch to GitHub:: | ||
|
||
|
@@ -99,7 +98,7 @@ Before you submit a pull request, check that it meets these guidelines: | |
2. If the pull request adds functionality, the docs should be updated. Put | ||
your new functionality into a function with a docstring, and add the | ||
feature to the list in README.rst. | ||
3. The pull request should work for Python 3.7 to 3.11, and PyPy. Check | ||
3. The pull request should work for currently supported Python and PyPy versions. Check | ||
https://travis-ci.org/bndr/pipreqs/pull_requests and make sure that the | ||
tests pass for all supported Python versions. | ||
|
||
|
@@ -108,4 +107,4 @@ Tips | |
|
||
To run a subset of tests:: | ||
|
||
$ python -m unittest tests.test_pipreqs | ||
$ poetry run python -m unittest tests.test_pipreqs |
This file was deleted.
Oops, something went wrong.
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,2 @@ | ||
[virtualenvs] | ||
prefer-active-python = true |
This file contains 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,39 @@ | ||
[tool.poetry] | ||
name = "pipreqs" | ||
version = "0.4.13" | ||
description = "Pip requirements.txt generator based on imports in project" | ||
authors = ["Vadim Kravcenko <[email protected]>"] | ||
license = "Apache-2.0" | ||
readme = ["README.rst", "HISTORY.rst"] | ||
packages = [{include = "pipreqs"}] | ||
repository = "https://github.com/bndr/pipreqs" | ||
keywords = ["pip", "requirements", "imports"] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11" | ||
] | ||
|
||
[tool.poetry.scripts] | ||
pipreqs = "pipreqs.pipreqs:main" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8.1,<3.12" | ||
yarg = "0.1.9" | ||
docopt = "0.6.2" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
flake8 = "^6.1.0" | ||
tox = "^4.11.3" | ||
coverage = "^7.3.2" | ||
sphinx = { version = "^7.2.6", python = ">=3.9" } | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
This file was deleted.
Oops, something went wrong.
This file contains 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