Skip to content

Commit

Permalink
pip install to use poetry as the build backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Armen Zambrano G committed May 15, 2020
1 parent 0b3b379 commit fda9e21
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 42 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ coverage.xml
.coverage

# Ignore tox installation
.tox
.tox

# Docs generation
docs.egg-info
8 changes: 7 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# https://docs.readthedocs.io/en/latest/config-file/index.html
version: 2
build:
image: latest
python:
version: 3.7
install:
- requirements: docs/requirement.txt
- method: pip
path: .
extra_requirements:
- docs
mkdocs:
configuration: mkdocs.yml
Empty file added docs/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion docs/common_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ that makes working on the docs locally much easier.

```console
% pip install poetry
% poetry install
% poetry install --extras "docs"
% poetry run mkdocs serve
```

Expand Down
65 changes: 34 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
[build-system]
requires = ["poetry>=1.0.5"]
build-backend = "poetry.masonry.api"

[tool.poetry]
name = "docs-package"
name = "docs"
version = "1.0.0"
description = "This is the package installer for docs"
authors = ["Mozilla"]

[tool.poetry.dependencies]
python = "^3.7"

[tool.poetry.dev-dependencies]
mkdocs = "1.0.4"
mkdocs-material = "==4.6.3"
mdx_truly_sane_lists = "1.2"
# A list of all of the optional dependencies, some of which are included in the
# below `extras`. They can be opted into by apps.
mkdocs = { version = "1.0.4", optional = true }
mkdocs-material = { version = "4.6.3", optional = true }
mdx_truly_sane_lists = { version = "1.2", optional = true }

[tool.poetry.extras]
docs = ["mkdocs", "mkdocs-material", "mdx_truly_sane_lists"]

[tool.black]
line-length = 100
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ commands_post =
[testenv:docs]
commands_pre =
pip install poetry
poetry install
# Generate the requirements file for Readthedocs
poetry export -f requirements.txt -o docs/requirement.txt
poetry install --extras "docs"
commands =
mkdocs build
commands_post =

[testenv:docker]
whitelist_externals=
Expand Down

0 comments on commit fda9e21

Please sign in to comment.