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 dependencies from requirements/*.txt #138

Merged
merged 4 commits into from
Oct 3, 2022
Merged
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ Following initiative from the author of Material for MkDocs, this plugin provide
Clone the repository:
```bash
# install project as editable
python -m pip install -U -r requirements.txt

# install development dependencies
python -m pip install -U -r requirements/development.txt
# alternatively: pip install -e .[dev]

# install project as editable
python -m pip install -e .

# install git hooks
pre-commit install
Expand All @@ -79,6 +80,7 @@ pytest

# install dependencies for documentation
python -m pip install -U -r requirements/documentation.txt
# alternatively: pip install -e .[doc]
```

Then follow the [contribution guidelines](CONTRIBUTING.md).
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
-i https://pypi.org/simple
setuptools
wheel

-r requirements/base.txt

-e "."
5 changes: 3 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Common requirements
# -----------------------

setuptools
wheel

GitPython>=3.1,<3.2
mkdocs>=1.1,<1.4
32 changes: 26 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@
HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()

with open(HERE / "requirements/base.txt") as f:
requirements = [
line
for line in f.read().splitlines()
if not line.startswith(("#", "-")) and len(line)
]

with open(HERE / "requirements/development.txt") as f:
requirements_dev = [
line
for line in f.read().splitlines()
if not line.startswith(("#", "-")) and len(line)
]


with open(HERE / "requirements/documentation.txt") as f:
requirements_docs = [
line
for line in f.read().splitlines()
if not line.startswith(("#", "-")) and len(line)
]


# ############################################################################
# ########## Setup #############
# ##############################
Expand Down Expand Up @@ -47,13 +70,10 @@
# dependencies
python_requires=">=3.7, <4",
extras_require={
"dev": ["black", "flake8", "pre-commit"],
"test": ["pytest", "pytest-cov"],
"dev": requirements_dev,
"doc": requirements_docs,
},
install_requires=[
"GitPython>=3.1,<3.2",
"mkdocs>=1.1,<1.5",
],
install_requires=requirements,
# metadata
keywords="mkdocs rss git plugin",
classifiers=[
Expand Down