raymondbutcher / pretf

Generate Terraform code with Python
https://pretf.readthedocs.io/
MIT License
104 stars 14 forks source link

Module not found when installing from pip #19

Closed bashton-ajenkins closed 5 years ago

bashton-ajenkins commented 5 years ago

Hey @raymondbutcher ,

The current pip release of pretf doesn't seem to actually include the module within it and when using it it reports Module not found.

I have confirmed this by looking at the RECORD file of the installed package which just has this as the contents:

../../../bin/pretf,sha256=WQoc3rsA60QyAN-k3etTff1qiWpaSMDjJfvN3KIkLzY,210
pretf-0.2.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
pretf-0.2.1.dist-info/METADATA,sha256=PMpbnFT_mhO-7vYxdFj3QoKfBMTZxgbuuPVym3X90Qw,266
pretf-0.2.1.dist-info/RECORD,,
pretf-0.2.1.dist-info/WHEEL,sha256=S8S5VL-stOTSZDYxHyf0KP7eds0J72qrK0Evu3TfyAY,92
pretf-0.2.1.dist-info/entry_points.txt,sha256=4XVXJO0FLCfFWjHVHb5X0JLGpzHxy-Im0eDTPHn_d8A,42
pretf-0.2.1.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1

Note the only installed file of note is /usr/bin/pretf.

Any chance of fixing this and getting another pip release out?

Thanks,

Alan Jenkins

raymondbutcher commented 5 years ago

Hey Alan. I haven’t made a pip release in a while. I’ll do it this morning and check that it works.

raymondbutcher commented 5 years ago

This is related to how it's using namespace modules to support having separate pretf and pretf.aws packages that end up both being under pretf when you import them. But it's broken. If you want to try this out before I get it fixed (probably won't get to it before tonight) then you can check out this repo and create a directory in the examples dir. If you use direnv then it will work automatically, otherwise check the contents of .envrc to see how it is pip installing it from a local path.

raymondbutcher commented 5 years ago

Actually I fixed it. Please try version 0.3.0