mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Swap from ansible to alembic for win compatibility
- Ansible is not compatible with windows so we shouldn't use it for testing, it is causing failures - Test for string presence before assuming str cmp - Fixes #1329 - Potentially resolves other issues with passing requirements markers from the command line
This commit is contained in:
+6
-3
@@ -508,6 +508,9 @@ def convert_deps_to_pip(deps, project=None, r=True, include_index=False):
|
||||
|
||||
dependencies = []
|
||||
|
||||
def is_star(val):
|
||||
return isinstance(val, six.string_types) and val == '*'
|
||||
|
||||
for dep in deps.keys():
|
||||
|
||||
# Default (e.g. '>1.10').
|
||||
@@ -516,7 +519,7 @@ def convert_deps_to_pip(deps, project=None, r=True, include_index=False):
|
||||
index = ''
|
||||
|
||||
# Get rid of '*'.
|
||||
if deps[dep] == '*' or str(extra) == '{}':
|
||||
if is_star(deps[dep]) or str(extra) == '{}':
|
||||
extra = ''
|
||||
|
||||
hash = ''
|
||||
@@ -533,7 +536,7 @@ def convert_deps_to_pip(deps, project=None, r=True, include_index=False):
|
||||
extra = '[{0}]'.format(deps[dep]['extras'][0])
|
||||
|
||||
if 'version' in deps[dep]:
|
||||
if not deps[dep]['version'] == '*':
|
||||
if not is_star(deps[dep]['version']):
|
||||
version = deps[dep]['version']
|
||||
|
||||
# For lockfile format.
|
||||
@@ -544,7 +547,7 @@ def convert_deps_to_pip(deps, project=None, r=True, include_index=False):
|
||||
specs = []
|
||||
for specifier in specifiers:
|
||||
if specifier in deps[dep]:
|
||||
if not deps[dep][specifier] == '*':
|
||||
if not is_star(deps[dep][specifier]):
|
||||
specs.append('{0} {1}'.format(specifier, deps[dep][specifier]))
|
||||
if specs:
|
||||
specs = '; {0}'.format(' and '.join(specs))
|
||||
|
||||
Reference in New Issue
Block a user