DEPRECATED: use dephell instead. It can do the same and much more.
Convert between dependency describing formats.
Input formats:
Pipfile
Pipfile.lock
pyproject.toml
(poetry)requirements.txt
Output formats:
setup.py
(returninstall_requires
anddependency_links
)requirements.txt
(return list of lines)
Install with needed extra requirements:
pip install install-requires[pipfile]
pip install install-requires[poetry]
Or from your setup.py:
from pip._internal import main as pip
pip(['install', 'install-requires[pipfile]'])
pip(['install', 'install-requires[poetry]'])
install-requires example/Pipfile requirements.txt
Available conversions:
- Pipfile -> requirements.txt
- Pipfile.lock -> requirements.txt
- pyproject.toml -> requirements.txt
Pass input format, output format and path to file that must be parsed into convert
function:
from pathlib import Path
from install_requires import convert
path = Path(__file__).parent
convert('pyproject.toml', 'setup.py', path)
Available conversions:
- Pipfile -> requirements.txt
- Pipfile.lock -> requirements.txt
- pyproject.toml -> requirements.txt
- Pipfile -> setup.py
- Pipfile.lock -> setup.py
- pyproject.toml -> setup.py
- requirements.txt -> setup.py
See example for more details.