Skip to content

Commit

Permalink
Merge pull request jazzband#657 from techalchemy/pip10-update
Browse files Browse the repository at this point in the history
Pip10 update
  • Loading branch information
vphilippon authored May 10, 2018
2 parents e9dce50 + b4100d1 commit 9cb41d8
Show file tree
Hide file tree
Showing 296 changed files with 232 additions and 101,668 deletions.
44 changes: 40 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
environment:

matrix:
- TOXENV: py27
- TOXENV: py34
- TOXENV: py35
- TOXENV: py36
- TOXENV: py27-pip8.1.1
PIP: 8.1.1
- TOXENV: py27-pip9.0.1
PIP: 9.0.1
- TOXENV: py27-pip9.0.3
PIP: 9.0.3
- TOXENV: py27-pipmaster
PIP: master
- TOXENV: py27-piplatest
PIP: latest
- TOXENV: py34-pip8.1.1
PIP: 8.1.1
- TOXENV: py34-pip9.0.1
PIP: 9.0.1
- TOXENV: py34-pip9.0.3
PIP: 9.0.3
- TOXENV: py34-pipmaster
PIP: master
- TOXENV: py34-piplatest
PIP: latest
- TOXENV: py35-pip8.1.1
PIP: 8.1.1
- TOXENV: py35-pip9.0.1
PIP: 9.0.1
- TOXENV: py35-pip9.0.3
PIP: 9.0.3
- TOXENV: py35-pipmaster
PIP: master
- TOXENV: py35-piplatest
PIP: latest
- TOXENV: py36-pip8.1.1
PIP: 8.1.1
- TOXENV: py36-pip9.0.1
PIP: 9.0.1
- TOXENV: py36-pip9.0.3
PIP: 9.0.3
- TOXENV: py36-pipmaster
PIP: master
- TOXENV: py36-piplatest
PIP: latest

install:
- C:\Python36\python -m pip install tox
Expand Down
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ python:
- "3.6"
- "pypy"

env:
- PIP=8.1.1
- PIP=9.0.1
- PIP=9.0.3
- PIP=master
- PIP=latest

cache: pip
install:
- travis_retry pip install tox-travis
Expand Down
6 changes: 0 additions & 6 deletions piptools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
import os
import sys

# Inject vendored directory into system path.
v_path = os.path.abspath(os.path.sep.join([os.path.dirname(os.path.realpath(__file__)), '_vendored']))
sys.path.insert(0, v_path)
17 changes: 17 additions & 0 deletions piptools/_compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,20 @@
else:
from tempfile import TemporaryDirectory
from contextlib import ExitStack

from .pip_compat import (
InstallRequirement,
parse_requirements,
RequirementSet,
user_cache_dir,
FAVORITE_HASH,
is_file_url,
url_to_path,
PackageFinder,
FormatControl,
Wheel,
Command,
cmdoptions,
get_installed_distributions,
PyPI,
)
30 changes: 30 additions & 0 deletions piptools/_compat/pip_compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding=utf-8 -*-
import importlib

def do_import(module_path, subimport=None, old_path=None):
internal = 'pip._internal.{0}'.format(module_path)
old_path = old_path or module_path
pip9 = 'pip.{0}'.format(old_path)
try:
_tmp = importlib.import_module(internal)
except ImportError:
_tmp = importlib.import_module(pip9)
if subimport:
return getattr(_tmp, subimport, _tmp)
return _tmp


InstallRequirement = do_import('req.req_install', 'InstallRequirement')
parse_requirements = do_import('req.req_file', 'parse_requirements')
RequirementSet = do_import('req.req_set', 'RequirementSet')
user_cache_dir = do_import('utils.appdirs', 'user_cache_dir')
FAVORITE_HASH = do_import('utils.hashes', 'FAVORITE_HASH')
is_file_url = do_import('download', 'is_file_url')
url_to_path = do_import('download', 'url_to_path')
PackageFinder = do_import('index', 'PackageFinder')
FormatControl = do_import('index', 'FormatControl')
Wheel = do_import('wheel', 'Wheel')
Command = do_import('basecommand', 'Command')
cmdoptions = do_import('cmdoptions')
get_installed_distributions = do_import('utils.misc', 'get_installed_distributions', old_path='utils')
PyPI = do_import('models.index', 'PyPI')
29 changes: 0 additions & 29 deletions piptools/_vendored/README.rst

This file was deleted.

Empty file removed piptools/_vendored/__init__.py
Empty file.
Loading

0 comments on commit 9cb41d8

Please sign in to comment.