Currently doing a JetBrains Academy project, it added the following line to my requirement.txt file:
https://github.com/hyperskill/hs-test-python/archive/release.tar.gz
Works fine with pip, however, when I want to install my package using pip install . I get the following error:
SystemExit: error in JetBrain Academy - Numeric Matrix Processor setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Parse error at "'://githu'": Expected stringEnd
My setup.py is the following:
import setuptools
REQS_FILENAME = "requirements.txt"
SETUP_FILENAME = "requirements-setup.txt"
def make_deps(filename):
"""Generate the install_requires parameter."""
with open(filename) as fhandle:
return fhandle.readlines()
def main():
"""Main setup function"""
setuptools.setup(
name='JetBrain Academy - Numeric Matrix Processor',
url="https://hyperskill.org/projects/96",
author='Zangdar',
description='Doing a Matrix processor from scratch',
packages=setuptools.find_packages(exclude=("tests",)),
install_requires=make_deps(REQS_FILENAME),
python_requires='>= 3.8',
setup_requires=make_deps(SETUP_FILENAME),
)
if __name__ == '__main__':
main()
And it can no longer run. The output of make_deps(REQS_FILENAME) is:
['https://github.com/hyperskill/hs-test-python/archive/release.tar.gz\n', '\n']
What can I do to make it work together ?
EDIT:
Here is my new pyproject.toml as suggested by Sinoroc:
[build-system]
requires = ["poetry_core>=1.1.4"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "NumericMatrixProcessor"
version = "0.1.0"
description = "JetBrainAcademy Project - Doind a matrix calculator from scratch."
authors = ["Zangdaarr"]
readme = "README.md"
repository = ""
homepage = "https://hyperskill.org/projects/96"
packages = [
{ include = "numeric_matrix_processor"}
]
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.dev-dependencies]
pytest = "*"
pytest-cov = "*"
pytest-lazy-fixture = "*"
pytest-mock = "*"
mock = "*"
sphinx = "*"
sphinx_rtd_theme = "*"
pylint = "*"