diff --git a/Pipfile b/Pipfile index 6c8c8916..f62e6fb1 100644 --- a/Pipfile +++ b/Pipfile @@ -2,7 +2,11 @@ url = "https://pypi.org/" verify_ssl = true +[requires] +python_version = '2.7' + [packages] crayons = "*" toml = "*" click = "*" +"delegator.py" = "*" diff --git a/Pipfile.freeze b/Pipfile.freeze index 7bb69f76..b15977a4 100644 --- a/Pipfile.freeze +++ b/Pipfile.freeze @@ -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"}} \ No newline at end of file +{"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"}} \ No newline at end of file diff --git a/pipenv/_pipfile/api.py b/pipenv/_pipfile/api.py index 10e1307b..5d57cbb2 100644 --- a/pipenv/_pipfile/api.py +++ b/pipenv/_pipfile/api.py @@ -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: diff --git a/pipenv/core.py b/pipenv/core.py index a28b81d7..66f0f3e3 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -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__':