开发者

PIP install a Python Package without a setup.py file?

开发者 https://www.devze.com 2022-12-19 10:42 出处:网络
I\'m trying to figure out how I can install a开发者_开发知识库 python package that doesn\'t have a setup.py file with pip. (package in question is http://code.google.com/p/django-google-analytics/)

I'm trying to figure out how I can install a开发者_开发知识库 python package that doesn't have a setup.py file with pip. (package in question is http://code.google.com/p/django-google-analytics/)

Normally I would just checkout the code from the repo and symlink into my site-packages, but I'm trying to get my whole environment frozen into a pip requirements file for easy deployment and testing.

Any ideas?


Fork the repo and add a working setup.py. Then send a pull request to the author.

Oh, it's on Google Code. Well then, file a bug and post a patch.

If the author refuses to make their code into an installable Python distribution (never happened to me), just host your fork somewhere and put that in your requirements file.


You can't. PIP installs Python packages. That's not a Python package. I've heard that the Django community in general doesn't make much packages, which makes things like what you are trying to do tricky. But that could be wrong.

If you want to freeze your environment you might want to look into Buildout. Other options in this case is to use an svn:external.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号