Convert requirements between formats
Project description
install_requires
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
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]'])
Usage
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)
See example for more details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file install-requires-0.2.1.tar.gz
.
File metadata
- Download URL: install-requires-0.2.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f78e260f2e666266117ff760d5fcc93366b040e2ad4b4221f32f70b073be343 |
|
MD5 | fd90dfafb4075c099a9337ceec441e20 |
|
BLAKE2b-256 | 2bdbbae4704a9abe5e0eac93abcadc99d95c49099d639e9296fa0cb847be908e |