Restore requirements as a list.

This commit is contained in:
Sergey Vartanov 2022-08-18 11:55:22 +03:00
parent afb050c2b0
commit 54bc5d1a52
2 changed files with 21 additions and 4 deletions

View file

@ -11,7 +11,17 @@ __author__ = "Sergey Vartanov"
__email__ = "me@enzet.ru"
__version__ = "0.1.7"
from pathlib import Path
with Path("requirements.txt").open() as input_file:
REQUIREMENTS: list[str] = [x[:-1] for x in input_file.readlines()]
REQUIREMENTS: list[str] = [
"CairoSVG>=2.5.0",
"colour>=0.1.5",
"numpy>=1.18.1",
"Pillow>=8.2.0",
"portolan>=1.0.1",
"pycairo>=1.20.1",
"pytest>=6.2.2",
"PyYAML>=4.2b1",
"setuptools>=51.0.0",
"Shapely>=1.7.1",
"svgwrite>=1.4",
"urllib3>=1.25.6",
]

View file

@ -0,0 +1,7 @@
from map_machine import REQUIREMENTS
from pathlib import Path
def test_requirements() -> None:
with Path("requirements.txt").open() as requirements_file:
assert [x[:-1] for x in requirements_file.readlines()] == REQUIREMENTS