3 ms·
This is remarkably similar to how I setup my Django settings.py files. The only thing I'd add is I like to have a lib folder and do a sys.path.insert(0, PATH/TO
by philipkimmey 15y ago
This is remarkably similar to how I setup my Django settings.py files. The only thing I'd add is I like to have a lib folder and do a sys.path.insert(0, PATH/TO/Lib/Folder) in my manage.py and .wsgi files. This makes it really easy to manage dependencies. The other option is to use virtualenv, but in my experience it falls down pretty hard on modules that require C bindings, so why not just manage it manually? In addition, if you use git, you can take advantage of git's submodule functionality to really easily keep track of specific versions of your submodules.
I was actually in the middle of a similar writeup that includes the above tips, so I'll post that when I'm done.
- tswicegood 15y ago> virtualenv... falls down pretty hard on mouldes that require C bindings Care to elaborate? virtualenv has worked fine for me and that plus pip means that the rest of the community can use and understand your code and all of its dependencies without having to have access to you or your machine to figure them out.
- philipkimmey 15y agoIt's possible that I simply haven't made enough effort, but trying to get PIL and Reportlab working from a virtualenv has been an uphill battle. I'd really like those libraries to work on OSX, Linux & Windows, but so far it has been easier to just install those two packages on the machines I need them on.