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

Use latest setuptools practice #71

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.pyc
build/
dist/
.venv*
*.egg-info/
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 0.8.1 (TBC)
* Change script into entry point.
* Avoid deprecated setup.py commands.

Version 0.8 (2022-09-22)
* Add --version to bin importlab.
* Use ImportStatement.source to impove import resolution.
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ To release to PyPI:
$ python3 -m venv .venv_release
$ source .venv_release/bin/activate
```
1. Make sure that `wheel` and `twine` are installed:
1. Make sure that `build`, `wheel` and `twine` are installed:
```console
$ pip install wheel twine
$ pip install build wheel twine
```
1. Navigate into the top-level `importlab` directory and build a source
distribution and a wheel:
```console
$ cd importlab
$ python3 setup.py sdist bdist_wheel
$ python3 -m build
```
The build command puts the distributions in a `dist` subdirectory and also
creates `build` and `importlab.egginfo` subdirectories as side effects.
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To check out and install the latest source code

git clone https://github.com/google/importlab.git
cd importlab
python setup.py install
python -m pip install .

Usage
-----
Expand Down
8 changes: 4 additions & 4 deletions bin/importlab → importlab/__main__.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import sys
from importlib.metadata import version

from importlab import environment
from importlab import graph
from importlab import output
from importlab import utils
from . import environment
from . import graph
from . import output
from . import utils


def parse_args():
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
EMAIL = '[email protected]'
AUTHOR = 'Google Inc.'
REQUIRES_PYTHON = '>=3.6.0'
VERSION = '0.8'
VERSION = '0.8.1'

REQUIRED = [
'networkx>=2',
Expand Down Expand Up @@ -45,7 +45,9 @@
python_requires=REQUIRES_PYTHON,
url=URL,
packages=PACKAGES,
scripts=['bin/importlab'],
entry_points={
'console_scripts': ['importlab=importlab.__main__:main'],
},
install_requires=REQUIRED,
include_package_data=True,
license='Apache 2.0',
Expand Down