Skip to content

Commit

Permalink
major_minor only for pyc name
Browse files Browse the repository at this point in the history
Signed-off-by: Kale Franz <[email protected]>
  • Loading branch information
kalefranz committed Sep 3, 2018
1 parent 21c4fb0 commit 55aa9a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions conda/common/pkg_formats/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import warnings

from ..compat import PY2, StringIO, itervalues, odict, open, string_types
from ..path import get_python_site_packages_short_path, pyc_path, win_path_ok
from ..path import get_python_site_packages_short_path, pyc_path, win_path_ok, \
get_major_minor_version
from ..._vendor.auxlib.decorators import memoizedproperty
from ..._vendor.frozendict import frozendict
from ..._vendor.toolz import concat, concatv, groupby
Expand Down Expand Up @@ -258,8 +259,9 @@ def process_csv_row(row):
files_set = set(record[0] for record in records)

_pyc_path, _py_file_re = pyc_path, PY_FILE_RE
py_ver_mm = get_major_minor_version(python_version, with_dot=False)
missing_pyc_files = (ff for ff in (
_pyc_path(f, python_version) for f in files_set if _py_file_re.match(f)
_pyc_path(f, py_ver_mm) for f in files_set if _py_file_re.match(f)
) if ff not in files_set)
records = sorted(concatv(records, ((pf, None, None) for pf in missing_pyc_files)))
return records
Expand Down
13 changes: 7 additions & 6 deletions conda/gateways/disk/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ def read_python_record(prefix_path, anchor_file, python_version):
))
files = tuple(p[0] for p in paths_tups)

elif isinstance(pydist, PythonEggLinkDistribution):
channel = Channel("<develop>")
build = "dev_0"
package_type = PackageType.VIRTUAL_PYTHON_EGG_LINK

paths_data, files = PathsData(paths_version=1, paths=()), ()

elif isinstance(pydist, PythonEggInfoDistribution):
channel = Channel("pypi")
build = "pypi_0"
Expand All @@ -273,12 +280,6 @@ def read_python_record(prefix_path, anchor_file, python_version):
package_type = PackageType.VIRTUAL_PYTHON_EGG_UNMANAGEABLE
paths_data, files = PathsData(paths_version=1, paths=()), ()

elif isinstance(pydist, PythonEggLinkDistribution):
channel = Channel("<develop>")
build = "dev_0"
package_type = PackageType.VIRTUAL_PYTHON_EGG_LINK

paths_data, files = PathsData(paths_version=1, paths=()), ()
else:
raise NotImplementedError()

Expand Down

0 comments on commit 55aa9a7

Please sign in to comment.