4

Here is the context:
I have a project with an app that I just packaged following the standard packaging tutorial for django app

my-app $ python setup.py sdist

I've installed my app into my project

(myenv)myproject $ pip install path/to/my-app/packaged

Now when I need to modify my app, I do the modifications, then

my-app $ python setup.py sdist
(myenv)myproject $ pip uninstall my-app
(myenv)myproject $ pip install path/to/my-app/packaged

Shouldn't there be an easier manner to accomplish this ?


Update

My idea is to upgrade both my project and my app, so I'll have a lot of commits going through.
Then when I think my app is versionable I'd package it. (Not sure I had been clear)

1
  • If you change version of the package you can use pip install --upgrade and omit pip uninstall Commented Oct 18, 2013 at 10:35

2 Answers 2

3

If you want to edit your app and actually see the changes in your project without reinstalling/upgrading your app each time something changed, you could install your app in editable mode:

pip install -e path/to/yourproject
Sign up to request clarification or add additional context in comments.

4 Comments

Thanks. This seems to me the best way (I didn't know about the editable mode). I've not been able to use it (I know nothing about setuptools) but this is another issue.
Ok I think I understand why I wasn't able to make it work. I didn't get that I still had to upgrade the package in my project after each modification.
... no, you shouldn't have to upgrade the package manually. Installed with pip install -e your app should be symlinked in your site-packages and therefore all changes should be immediately reflected in your app.
Ok then I'll make a new SO question. Thanks !
3

You can use pip install --upgrade <path>

Have you considered it?

1 Comment

It sounds to me that you need some sort of a bash script to help you with packing and unpacking your app. Or a git hook if you are using git.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.