Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip10 update #657

Merged
merged 3 commits into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a duplicate PIP=master here

- 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