Skip to content

Commit c5dff78

Browse files
committed
Switch from setup.py to Poetry.
1 parent ceef62e commit c5dff78

9 files changed

Lines changed: 777 additions & 52 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
*.egg-info
2+
.ipynb_checkpoints
23
.mypy_cache
34
.pytest_cache
45
__pycache__
56
.vscode
7+
build
68
dist
79
docs/_build
810
venv
9-
build

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ matrix:
88
include:
99
- python: 3.7
1010

11+
before_install:
12+
- pip install poetry
13+
1114
install:
12-
- pip install -e .
13-
- pip install -r requirements.txt
15+
- poetry install
1416

1517
script:
16-
- make
18+
- poetry run make

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The targets in this makefile should be executed inside Poetry, i.e. `poetry make
2+
# docs`.
3+
14
.PHONY: docs
25

36
default: mypy-generate test-generate generate test-import mypy-cdp test-cdp
@@ -14,11 +17,6 @@ mypy-cdp:
1417
mypy-generate:
1518
mypy generator/
1619

17-
publish:
18-
rm -fr dist chrome_devtools_protocol.egg-info
19-
$(PYTHON) setup.py sdist
20-
twine upload dist/*
21-
2220
test-cdp:
2321
pytest test/
2422

docs/develop.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ modify the code generation process. Note that code is generated and then checked
66
in, so that anybody who wants to use the library can use it immediately–no build
77
step is required in that scenario.
88

9-
You'll first need to install the extra dependencies specified in
10-
``requirements.txt``, ideally inside a virtual environment.
9+
The repository uses `Poetry <https://python-poetry.org/>`_ to manage dependencies. Once
10+
you have Poetry installed, use this command to create a new virtual environment and
11+
install PyCDP and its dependencies (including dev dependencies0 in it.
12+
13+
::
14+
15+
$ poetry install
1116

1217
Next, a ``Makefile`` is included that provides the following build targets:
1318

docs/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Chrome package:
3131
* `Windows 32-bit <https://storage.googleapis.com/chromium-browser-snapshots/Win/678025/chrome-win.zip>`_
3232
* `Windows 64-bit <https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/678025/chrome-win.zip>`_
3333

34-
**To install (requires Python ≥3.7):**
34+
**Install from PyPI (requires Python ≥3.7):**
3535

3636
::
3737

0 commit comments

Comments
 (0)