Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.
/ pynjector Public archive

Flint dependency injector from Pipenv for Python

License

Notifications You must be signed in to change notification settings

jonpoveda/pynjector

Repository files navigation

pynjector

Flit dependency injector from Pipenv for Python3

Usage

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

As an script

Run the tool as an script:

python pynjector/injector

You can add the argument -h to check for options.

As a module

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

Developing

Clone this project and generate a python environment for developing with Pipenv:

pipenv install --dev

Packaging

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

About

Flint dependency injector from Pipenv for Python

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages