Skip to content

Instantly share code, notes, and snippets.

@sky-code
Created August 30, 2018 15:19
Show Gist options
  • Save sky-code/03953dac9593fac7b55df17ee77a9491 to your computer and use it in GitHub Desktop.
Save sky-code/03953dac9593fac7b55df17ee77a9491 to your computer and use it in GitHub Desktop.
setup.py install_requires from pipfile
from setuptools import setup
from pipenv.project import Project
from pipenv.utils import convert_deps_to_pip
def get_packages_from_Pipfile():
pipfile = Project(chdir=False).parsed_pipfile
return convert_deps_to_pip(pipfile['packages'], r=False)
setup(install_requires=get_packages_from_Pipfile())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment