-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d509486
commit bdf5c5a
Showing
8 changed files
with
342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[[source]] | ||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
|
||
[packages] | ||
wheel = "*" | ||
pipenv = "*" | ||
|
||
[dev-packages] | ||
flake8 = "*" | ||
jedi = "*" | ||
neovim = "*" | ||
psutil = "*" | ||
pdb = "*" | ||
coverage = "*" | ||
jupyter = "*" | ||
twine = "*" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Intent | ||
|
||
[Pipenv](http://docs.pipenv.org/en/latest/) is a great python virtual environment management system. However it does not have the same popularity as others such as `virtualenv`. This causes some issuesj | ||
when working with a team. Pipenv does not have a native set of tools for making cross virtual environment management tools work nor should it. | ||
|
||
This is a package that allows for a few convince commands in order to provide easier usage for mixed environment teams. | ||
|
||
|
||
## Tools included | ||
|
||
### Rebuilding Requirements | ||
|
||
Rebuilding your requirements file is a pain if it is not your primary source of `pip` truth. This command runs `pipenv lock` and then packages only the non-development | ||
modules. It also sorts your `requirements.txt` file in alphabetical order for easier reading. | ||
|
||
$ rebuild_requirements | ||
|
||
### Installing packages from Requirements | ||
|
||
Installing from `requirements.txt` file is sometimes required. Pipenv does not provide a quick way to do this. | ||
|
||
$ install_requirements | ||
|
||
This will process your `requirements.txt` file and install all missing packages to the non-development package set on Pipenv. There is a suggested work around that also | ||
provides this functionality if you wish to execute it yourself without the necessity of installing this package. | ||
|
||
$ pipenv install $(< requirements.txt) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
|
||
from pipenv.project import Project | ||
from pipenv.utils import convert_deps_to_pip | ||
|
||
""" | ||
This is a generation file that uses pipenv to regenerate the requirements file. | ||
This tool allows for development only requirements that each developer can use separate of the | ||
production tool set. | ||
http://docs.pipenv.org/en/latest/ | ||
""" | ||
|
||
|
||
def rebuild(): | ||
os.system('pipenv lock') | ||
packages = Project().parsed_pipfile.get('packages', {}) | ||
deps = convert_deps_to_pip(packages, r=False) | ||
|
||
with open('requirements.txt', 'w') as f: | ||
print(deps) | ||
f.write('\n'.join(sorted(deps))) | ||
|
||
|
||
def install(): | ||
os.system('pipenv install $(< requirements.txt)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pipenv | ||
wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[metadata] | ||
description-file = README.md | ||
|
||
[bdist_wheel] | ||
universal=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from setuptools import setup | ||
|
||
setup(name='pipenv-package-requirements', | ||
version='0.1', | ||
description='Pipenv tools for requirements.txt', | ||
url='https://github.com/Blue-Dog-Archolite/pipenv-package-requirements', | ||
author='Robert R. Meyer', | ||
author_email='Blue.Dog.Archolite@gmail.com', | ||
license='GNU', | ||
packages=['pipenv_tools'], | ||
zip_safe=True, | ||
console_scripts=[ | ||
'rebuild_requirements=pipenv_tools.command_line:rebuild', | ||
'install_requirements=pipenv_tools.command_line:install', | ||
], | ||
keywords='pipenv virtualenv', | ||
install_requires=[ | ||
'pipenv', | ||
], | ||
) |