mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
add check command
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
url = "https://pypi.org/"
|
||||
verify_ssl = true
|
||||
|
||||
[requires]
|
||||
python_version = '2.7'
|
||||
|
||||
[packages]
|
||||
crayons = "*"
|
||||
toml = "*"
|
||||
click = "*"
|
||||
"delegator.py" = "*"
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"default": {"colorama": "==0.3.7", "crayons": "==0.1.1", "toml": "==0.9.2", "click": "==6.7"}, "develop": {}, "_meta": {"sources": [{"url": "https://pypi.org/", "verify_ssl": true}], "requires": {}, "Pipfile-sha256": "8cfe2a7c071e7058f9a2cd8a8e6f02b6f3384eb2f8c107565e9ad8f98a0b10ed"}}
|
||||
{"default": {"crayons": "==0.1.1", "colorama": "==0.3.7", "daemon": "==1.1", "delegator.py": "==0.0.1", "pexpect": "==4.2.1", "toml": "==0.9.2", "click": "==6.7", "ptyprocess": "==0.5.1"}, "develop": {}, "_meta": {"sources": [{"url": "https://pypi.org/", "verify_ssl": true}], "requires": {}, "Pipfile-sha256": "ce6157382da4a84c865a7f63c551bb4112c15c3168158e4b21ce08c933e4c164"}}
|
||||
@@ -177,9 +177,7 @@ class Pipfile(object):
|
||||
}
|
||||
|
||||
# Assert each specified requirement.
|
||||
for requirement in self.data['_meta']['requires']:
|
||||
marker = requirement['marker']
|
||||
specifier = requirement['specifier']
|
||||
for marker, specifier in self.data['_meta']['requires'].iteritems():
|
||||
|
||||
if marker in lookup:
|
||||
try:
|
||||
|
||||
@@ -447,8 +447,15 @@ def venv(bare=False):
|
||||
def purge():
|
||||
do_purge()
|
||||
|
||||
@click.command()
|
||||
def check():
|
||||
click.echo(crayons.yellow('Checking PEP 508 requirements...'))
|
||||
|
||||
# Load the Pipfile.
|
||||
p = pipfile.load(project.pipfile_location())
|
||||
|
||||
# Assert the given requirements.
|
||||
p.assert_requirements()
|
||||
|
||||
# Install click commands.
|
||||
cli.add_command(init)
|
||||
@@ -459,6 +466,7 @@ cli.add_command(freeze)
|
||||
cli.add_command(py)
|
||||
cli.add_command(venv)
|
||||
cli.add_command(purge)
|
||||
cli.add_command(check)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user