Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #362 from dephell/fixes
Browse files Browse the repository at this point in the history
Support new pip and dephell_archive
  • Loading branch information
orsinium committed Jan 23, 2020
2 parents a05bfad + eea580d commit 9a4dd20
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
9 changes: 8 additions & 1 deletion dephell/converters/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from dephell_discover import Root as PackageRoot
from dephell_links import DirLink, FileLink
from pip._internal.download import PipSession
from pip._internal.index import PackageFinder
from pip._internal.req import parse_requirements

# app
Expand All @@ -19,6 +18,14 @@
from .base import BaseConverter


try:
# pip<20.0.1
from pip._internal.index import PackageFinder
except ImportError:
# pip>=20.0.1
from pip._internal.index.package_finder import PackageFinder


class PIPConverter(BaseConverter):
sep = ' \\\n '

Expand Down
2 changes: 1 addition & 1 deletion dephell/converters/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def load(self, path) -> RootDependency:
archive.glob('src/*.egg-info'),
archive.glob('src/*/*.egg-info'),
)
paths = [path for path in paths if 'tests' not in path.parts]
paths = [path for path in paths if 'tests' not in path.member_path.parts]
if paths:
root = converter.load_dir(*paths)
root.readme = Readme.discover(path=archive)
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
except ImportError:
from distutils.core import setup

# built-in
import os.path


readme = ''
here = os.path.abspath(os.path.dirname(__file__))
readme_path = os.path.join(here, 'README.rst')
Expand Down Expand Up @@ -60,8 +62,8 @@
'dephell-markers>=1.0.0', 'dephell-pythons>=0.1.11',
'dephell-setuptools>=0.2.1', 'dephell-shells>=0.1.3',
'dephell-specifier>=0.1.7', 'dephell-venvs>=0.1.16',
'dephell-versioning', 'html5lib', 'jinja2', 'm2r', 'packaging',
'pip>=18.0', 'pygments', 'requests', 'ruamel.yaml', 'tomlkit', 'yaspin'
'dephell-versioning', 'jinja2', 'm2r', 'packaging', 'pip>=18.0',
'requests', 'tomlkit', 'yaspin'
],
extras_require={
"dev": [
Expand All @@ -74,7 +76,8 @@
],
"full": [
"aiofiles", "appdirs", "autopep8", "bowler", "colorama", "docker",
"dockerpty", "fissix", "flatdict", "graphviz", "tabulate", "yapf"
"dockerpty", "fissix", "flatdict", "graphviz", "html5lib",
"pygments", "ruamel.yaml", "tabulate", "yapf"
],
"tests": ["aioresponses", "pytest", "requests-mock"]
},
Expand Down

0 comments on commit 9a4dd20

Please sign in to comment.