From cc9a6dd76f2d0d502fdd497e0182ba0e96f3bd1c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 10 Mar 2017 23:03:12 -0500 Subject: [PATCH] towards windows support --- Pipfile | 44 ++++----- Pipfile.lock | 242 ++++++++------------------------------------------ pipenv/cli.py | 6 +- setup.py | 2 +- 4 files changed, 63 insertions(+), 231 deletions(-) diff --git a/Pipfile b/Pipfile index ecb0aa45..c0924f87 100644 --- a/Pipfile +++ b/Pipfile @@ -1,22 +1,22 @@ -[dev-packages] -pytest = "*" -mock = "*" -Sphinx = "*" - -[packages] -click = "*" -crayons = "*" -toml = "*" -"delegator.py" = ">=0.0.6" -requests = ">=2.4.0" -requirements-parser = "*" -parse = "*" -pipfile = "==0.0.1" -click-completion = "*" -psutil = "*" -pew = ">=0.1.26" -blindspin = "*" -"backports.shutil_get_terminal_size" = "*" - -[requires] -python_version = "2.7" +[dev-packages] +pytest = "*" +mock = "*" +Sphinx = "*" + +[packages] +click = "*" +crayons = "*" +toml = "*" +"delegator.py" = ">=0.0.6" +requests = ">=2.4.0" +requirements-parser = "*" +parse = "*" +pipfile = "==0.0.2" +click-completion = "*" +psutil = "*" +pew = ">=0.1.26" +blindspin = "*" +"backports.shutil_get_terminal_size" = "*" + +[requires] +python_version = "2.7" diff --git a/Pipfile.lock b/Pipfile.lock index 00a8bc89..9f04ac9e 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,208 +1,36 @@ -{ - "_meta": { - "hash": { - "sha256": "33bb704e3081ebcb3c18c3a36ef4b26218e52e2f1075c34b1a11ac0d18198d42" - }, - "requires": { - "python_version": "2.7" - }, - "sources": [ - { - "url": "https://pypi.python.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "Jinja2": { - "hash": "sha256:a7b7438120dbe76a8e735ef7eba6048eaf4e0b7dbc530e100812f8ec462a4d50", - "version": "==2.9.5" - }, - "MarkupSafe": { - "hash": "sha256:a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3", - "version": "==0.23" - }, - "appdirs": { - "hash": "sha256:a53330b9d53b66aba1e26907dea2958982ebad92735f9faf3897b73c909a20c1", - "version": "==1.4.2" - }, - "backports.shutil_get_terminal_size": { - "hash": "sha256:0975ba55054c15e346944b38956a4c9cbee9009391e41b86c68990effb8c1f64", - "version": "==1.0.0" - }, - "blindspin": { - "hash": "sha256:b30ef7a26ef1637c1d047667b279e8c15dc2a78fcfaad6b3027d7217e752bdba", - "version": "==2.0.1" - }, - "click": { - "hash": "sha256:29f99fc6125fbc931b758dc053b3114e55c77a6e4c6c3a2674a2dc986016381d", - "version": "==6.7" - }, - "click-completion": { - "hash": "sha256:079fb138887d4de12a0b7fbebf8d92d396b7c1a9c49f63475d9f3909d2588976", - "version": "==0.2.1" - }, - "colorama": { - "hash": "sha256:a4c0f5bc358a62849653471e309dcc991223cf86abafbec17cd8f41327279e89", - "version": "==0.3.7" - }, - "crayons": { - "hash": "sha256:5e17691605e564d63482067eb6327d01a584bbaf870beffd4456a3391bd8809d", - "version": "==0.1.2" - }, - "delegator.py": { - "hash": "sha256:fbfbda2e36edb64250629a98911f8b0c8f5f66af5936608d1fb44d9b866c51d6", - "version": "==0.0.8" - }, - "packaging": { - "hash": "sha256:99276dc6e3a7851f32027a68f1095cd3f77c148091b092ea867a351811cfe388", - "version": "==16.8" - }, - "parse": { - "hash": "sha256:8b4f28bbe7c0f24981669ea92b2ba704ee63b5346027e82be30118bb5788ff10", - "version": "==1.8.0" - }, - "pew": { - "hash": "sha256:259ac7a4603fe41b1fa950f30b2e4ccf4a23f7c89be2c34e0a4cec176c3ec581", - "version": "==0.1.26" - }, - "pexpect": { - "hash": "sha256:f853b52afaf3b064d29854771e2db509ef80392509bde2dd7a6ecf2dfc3f0018", - "version": "==4.2.1" - }, - "pipfile": { - "hash": "sha256:a0bf9924d9bd25fa5e216d643fde49ff67f48727cb711a02ad806bf7c4722ea2", - "version": "==0.0.1" - }, - "psutil": { - "hash": "sha256:959bd58bdc8152b0a143cb3bd822d4a1b8f7230617b0e3eb2ff6e63812120f2b", - "version": "==5.1.3" - }, - "ptyprocess": { - "hash": "sha256:464cb76f7a7122743dd25507650db89cd447c51f38e4671602b3eaa2e38e05ae", - "version": "==0.5.1" - }, - "pyparsing": { - "hash": "sha256:67101d7acee692962f33dd30b5dce079ff532dd9aa99ff48d52a3dad51d2fe84", - "version": "==2.1.10" - }, - "pythonz-bd": { - "hash": "sha256:6dacd9aed6018014c75acfa9c994d755715c73bc786bdc6c6186d3cf184bacf0", - "version": "==1.11.4" - }, - "requests": { - "hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb", - "version": "==2.13.0" - }, - "requirements-parser": { - "hash": "sha256:fee2380a469ffe4067bc7f0096a6fcfb27539da7496fae12b74b8d5d0f33a4ee", - "version": "==0.1.0" - }, - "resumable-urlretrieve": { - "hash": "sha256:947ee07dd68cb5e2989377bdc8f2f4f1f327b6ea531b03da50c6b819b29bc7fb", - "version": "==0.1.5" - }, - "setuptools": { - "hash": "sha256:9349b47bcdef2e695065791260f9416b7aae8739fd30c6849f807bce5281d046", - "version": "==34.3.1" - }, - "six": { - "hash": "sha256:0ff78c403d9bccf5a425a6d31a12aa6b47f1c21ca4dc2573a7e2f32a97335eb1", - "version": "==1.10.0" - }, - "toml": { - "hash": "sha256:b3953bffe848ad9a6d554114d82f2dcb3e23945e90b4d9addc9956f37f336594", - "version": "==0.9.2" - }, - "virtualenv": { - "hash": "sha256:39d88b533b422825d644087a21e78c45cf5af0ef7a99a1fc9fbb7b481e5c85b0", - "version": "==15.1.0" - }, - "virtualenv-clone": { - "hash": "sha256:6b3be5cab59e455f08c9eda573d23006b7d6fb41fae974ddaa2b275c93cc4405", - "version": "==0.2.6" - } - }, - "develop": { - "Babel": { - "hash": "sha256:3318ed2960240d61cbc6558858ee00c10eed77a6508c4d1ed8e6f7f48399c975", - "version": "==2.3.4" - }, - "Jinja2": { - "hash": "sha256:a7b7438120dbe76a8e735ef7eba6048eaf4e0b7dbc530e100812f8ec462a4d50", - "version": "==2.9.5" - }, - "MarkupSafe": { - "hash": "sha256:a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3", - "version": "==0.23" - }, - "Pygments": { - "hash": "sha256:78f3f434bcc5d6ee09020f92ba487f95ba50f1e3ef83ae96b9d5ffa1bab25c5d", - "version": "==2.2.0" - }, - "Sphinx": { - "hash": "sha256:2809b2ab81906483b47c9d7e28740e3b69c160617f33d7aa11dc4ae376fd04d9", - "version": "==1.5.3" - }, - "alabaster": { - "hash": "sha256:2eef172f44e8d301d25aff8068fddd65f767a3f04b5f15b0f4922f113aa1c732", - "version": "==0.7.10" - }, - "appdirs": { - "hash": "sha256:a53330b9d53b66aba1e26907dea2958982ebad92735f9faf3897b73c909a20c1", - "version": "==1.4.2" - }, - "docutils": { - "hash": "sha256:cb3ebcb09242804f84bdbf0b26504077a054da6772c6f4d625f335cc53ebf94d", - "version": "==0.13.1" - }, - "imagesize": { - "hash": "sha256:6ebdc9e0ad188f9d1b2cdd9bc59cbe42bf931875e829e7a595e6b3abdc05cdfb", - "version": "==0.7.1" - }, - "mock": { - "hash": "sha256:5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1", - "version": "==2.0.0" - }, - "packaging": { - "hash": "sha256:99276dc6e3a7851f32027a68f1095cd3f77c148091b092ea867a351811cfe388", - "version": "==16.8" - }, - "pbr": { - "hash": "sha256:d9b69a26a5cb4e3898eb3c5cea54d2ab3332382167f04e30db5e1f54e1945e45", - "version": "==2.0.0" - }, - "py": { - "hash": "sha256:2d4bba2e25fff58140e6bdce1e485e89bb59776adbe01d490baa6b1f37a3dd6b", - "version": "==1.4.32" - }, - "pyparsing": { - "hash": "sha256:67101d7acee692962f33dd30b5dce079ff532dd9aa99ff48d52a3dad51d2fe84", - "version": "==2.1.10" - }, - "pytest": { - "hash": "sha256:da0ab50c7eec0683bc24f1c1137db1f4111752054ecdad63125e7ec71316b813", - "version": "==3.0.6" - }, - "pytz": { - "hash": "sha256:a1ea35e87a63c7825846d5b5c81d23d668e8a102d3b1b465ce95afe1b3a2e065", - "version": "==2016.10" - }, - "requests": { - "hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb", - "version": "==2.13.0" - }, - "setuptools": { - "hash": "sha256:9349b47bcdef2e695065791260f9416b7aae8739fd30c6849f807bce5281d046", - "version": "==34.3.1" - }, - "six": { - "hash": "sha256:0ff78c403d9bccf5a425a6d31a12aa6b47f1c21ca4dc2573a7e2f32a97335eb1", - "version": "==1.10.0" - }, - "snowballstemmer": { - "hash": "sha256:9f3bcd3c401c3e862ec0ebe6d2c069ebc012ce142cce209c098ccb5b09136e89", - "version": "==1.2.1" - } - } +{ + "_meta": { + "hash": { + "sha256": "4e215f83ada415726a064a01ad5bdd5daf169d1ef41623b1c05e6cd8fe1f0fc5" + }, + "requires": { + "python_version": "2.7" + }, + "sources": [ + { + "url": "https://pypi.python.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "backports.shutil_get_terminal_size": "*", + "blindspin": "*", + "click": "*", + "click-completion": "*", + "crayons": "*", + "delegator.py": ">=0.0.6", + "parse": "*", + "pew": ">=0.1.26", + "pipfile": "==0.0.2", + "psutil": "*", + "requests": ">=2.4.0", + "requirements-parser": "*", + "toml": "*" + }, + "develop": { + "Sphinx": "*", + "mock": "*", + "pytest": "*" + } } \ No newline at end of file diff --git a/pipenv/cli.py b/pipenv/cli.py index 5d28e52c..2bc6d133 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -564,6 +564,7 @@ def pip_install(package_name=None, r=None, allow_global=False, require_hashes=Fa if require_hashes: install_reqs += ' --require-hashes' + print('"{0}" install {1} -i {2}'.format(which_pip(allow_global=allow_global), install_reqs, source['url'])) c = delegator.run('"{0}" install {1} -i {2}'.format(which_pip(allow_global=allow_global), install_reqs, source['url'])) if c.return_code == 0: @@ -582,7 +583,10 @@ def pip_download(package_name): def which(command): - return os.sep.join([project.virtualenv_location] + ['bin/{0}'.format(command)]) + if os.name == 'nt': + return os.sep.join([project.virtualenv_location] + ['Scripts\{0}.exe'.format(command)]) + else: + return os.sep.join([project.virtualenv_location] + ['bin/{0}'.format(command)]) def which_pip(allow_global=False): diff --git a/setup.py b/setup.py index 2c293952..f894efca 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ required = [ 'delegator.py>=0.0.6', 'requirements-parser', 'pexpect', - 'pipfile==0.0.1', + 'pipfile==0.0.2', 'requests>=2.4.0', 'pew>=0.1.26', 'blindspin>=2.0.1'