Skip to content

Commit

Permalink
Merge pull request #138 from Guts/dev/simpler-dependencies
Browse files Browse the repository at this point in the history
Use dependencies from requirements/*.txt
  • Loading branch information
Guts authored Oct 3, 2022
2 parents b6a45e9 + 897f6b4 commit 9e16eb7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 12 deletions.
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

0 comments on commit 9e16eb7

Please sign in to comment.