Flit dependency injector from Pipenv for Python3
First of all, generate a python environment with Pipenv if you haven't
got any and install pynjector
:
pipenv install
pipenv install pynjector-0.1-py3-none-any.whl
and activate the environment:
pipenv shell
Run the tool as an script:
python pynjector/injector
You can add the argument -h
to check for options.
Just import it in your python module or run it in your python shell:
from pathlib import Path
import pynjector
deps = pynjector.parse_pipenv(Path('Pipfile.lock'))
pynjector.inject(deps, Path('pyproject.toml'))
Note: no wheel is currently available online but you can build one following the steps indicated in Building section
Clone this project and generate a python environment for developing with Pipenv:
pipenv install --dev
Following PEP 518 recommendations, this project can be easily build by using Flit, following this steps:
- Update library version in
src\__init__.py
- In case of dependency changes, use injector to update
pyproject.toml
python pynjector/injector
- Ask Flit to generate the wheel:
flit build --format wheel
- Check
dist
directory for the compiled library