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

Python: grpc's setup.py may contain unrelated files #43

Open
jmuk opened this issue Jun 13, 2016 · 3 comments
Open

Python: grpc's setup.py may contain unrelated files #43

jmuk opened this issue Jun 13, 2016 · 3 comments

Comments

@jmuk
Copy link
Contributor

jmuk commented Jun 13, 2016

@mvashishtha noticed a bug on googleapis/artman, running PythonGrpcClientPipeline twice will cause an error. Without cleanup, the generated directory may contain several unrelated files, and therefore packman lists unrelated files in setup.py and then causes error.

setup.py shouldn't catch those unrelated files, we will need some heuristics of doing so.

@jmuk
Copy link
Contributor Author

jmuk commented Jun 13, 2016

cc: @geigerj

@geigerj
Copy link
Contributor

geigerj commented Jun 13, 2016

This comes specifically from packman's declaration of namespace packages in setup.py.

It seems somewhat odd that packman declares all possible packages as namespace packages. One non-heuristic based option might be to restrict the possible declared namespace packages to a whitelist passed as a command-line argument.

If we actually want the behavior of declaring all possible packages as namespace packages, then perhaps packman should inspect the directories to ensure they contain an init.py before marking them as namespace packages.

@jmuk
Copy link
Contributor Author

jmuk commented Jun 13, 2016

setup.py.mustache simply lists nsPackages (https://github.com/googleapis/packman/blob/master/templates/python/setup.py.mustache) and nsPackages are generated at https://github.com/googleapis/packman/blob/master/lib/packager.js#L173

We should fix the latter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants