Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Conflicting package names #116

@wrobstory

Description

@wrobstory

Hi subpar folks! Apologies if this is a duplicate but I couldn't find any prior art.

When using tensorflow in subpar, in the import roots you end up with a ton of packages named google:

$ find unzipped_par/ -name google -type d | sort
unzipped_par/pypi2__google_api_core_1_14_2/google
unzipped_par/pypi2__googleapis_common_protos_1_6_0/google
unzipped_par/pypi2__google_auth_1_6_3/google
unzipped_par/pypi2__google_cloud_bigquery_1_6_1/google
unzipped_par/pypi2__google_cloud_bigtable_0_31_1/google
unzipped_par/pypi2__google_cloud_core_0_28_1/google
unzipped_par/pypi2__google_cloud_datastore_1_7_4/google
unzipped_par/pypi2__google_cloud_pubsub_0_39_0/google
unzipped_par/pypi2__google_resumable_media_0_3_2/google
unzipped_par/pypi2__grpc_google_iam_v1_0_11_4/google
unzipped_par/pypi2__protobuf_3_7_0/google
unzipped_par/pypi2__proto_google_cloud_datastore_v1_0_90_4/google
unzipped_par/pypi2__tensorflow_1_14_0/tensorflow/include/external/protobuf_archive/python/google
unzipped_par/pypi2__tensorflow_1_14_0/tensorflow/include/external/protobuf_archive/src/google
unzipped_par/pypi2__tensorflow_1_14_0/tensorflow/include/google

When you import, it resolves to the first import root:

(Pdb) google.__path__
['/pay/home/df/dev-df/unzipped_par/pypi2__google_api_core_1_14_2/google']

I believe that in a virtualenv-like environment, everything would get resolved under a single google package with subpackages for each library:

$ ls import_test_virtualenv/lib/python2.7/site-packages/google
api  api_core  auth  logging  longrunning  oauth2  protobuf  rpc  type

I'm trying to figure out if I'm missing something: should subpar be resolving these separate packages in a similar way so that we don't have a first-import-wins situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions