Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix paths and synchronize instructions of git and non-git repos #10

Closed
wants to merge 8 commits into from

2 participants

@glogiotatidis

No description provided.

@davedash

Please rebase your commits into a smaller set of commits, some of these seem to do things, and then undo things (like the fix path commits)

git rebase --interactive master

is a good interface for this, you can mark commits as "f" or "s" to squash, or simply fold into previous commits.

@glogiotatidis

Thanks for the rebase tip. Indeed I committed wrong documentation, which was fixed with a newer commit.

Now everything should be better, except this "Merge commit" which I can't figure a way not to push to you or delete. Any ideas?

@davedash davedash closed this
@davedash davedash reopened this
@davedash

Also, you may want to talk about https://github.com/jbalogh/vending-machine/ - no worries if I'm asking a lot, this is definitely an improvement as is, but I think talking about using the vend command will make it 10x.

@glogiotatidis

Aha! I'll have a look at this and make the appropriate additions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 12 deletions.
  1. +13 −12 packages.rst
View
25 packages.rst
@@ -15,7 +15,7 @@ of all your dependencies should exist in several places:
Ultimately your app code will run against the libraries under
vendor/vendor-local via mod_wsgi.
-Why requirements? For developement, you can use virtualenvs and pip to have a
+Why requirements? For developement, you can use virtualenvs and pip to have a
tidy self-contained environment. If run from the Django runserver command, you
don't even need a web server.
@@ -63,7 +63,7 @@ compiled.txt vs prod.txt
------------------------
If a Python library requires compilation, it should be recorded in compiled.txt.
These aren't as portable and cannot be shipped in the vendor library.
-For local development, it's nice to pip install these into a virtualenv. A
+For local development, it's nice to pip install these into a virtualenv. A
common practise is to use virtual env **only** for compiled libraries and
vendor for the rest of your dependencies.
@@ -71,8 +71,8 @@ Adding new packages
-------------------
If we wanted to add a new dependency called ``cheeseballs`` to playdoh, you
-would add it to ``requirements/prod.txt``. If your library isn't used in
-production, then put it in ``requirements/dev.txt``. This makes it available
+would add it to ``requirements/prod.txt``. If your library isn't used in
+production, then put it in ``requirements/dev.txt``. This makes it available
to users installing into virtualenvs.
We also need to add the new package to the vendor-local lib, since that is
@@ -102,7 +102,7 @@ For hg repos that are not on PyPI, they can be installed with pip too
but omit the ``--home`` option and use the ``--src`` instead. For
example::
- pip install -I --src='vendor-local/src' \
+ pip install -I --src='vendor-local/src' \
-e hg+http://bitbucket.org/jespern/django-piston@default#egg=django-piston
cd vendor-local
git add src/django-piston
@@ -114,21 +114,22 @@ example::
``vendor-local/vendor.pth``. See note below. For example::
echo src/django-piston >> vendor-local/vendor.pth
-
+ git commit vendor-local/vendor.pth
+
git-based repositories
~~~~~~~~~~~~~~~~~~~~~~
For a git-based package, add it as a git submodule::
- cd vendor-local
- git submodule add git://github.com/mozilla/cheeseballs.git src/cheeseballs
- git commit vendor.pth .gitmodules src/cheeseballs
+ git submodule add git://github.com/mozilla/cheeseballs.git vendor-local/src/cheeseballs
+ git commit .gitmodules vendor-local/src/cheeseballs
Further, you then need to update ``vendor-local/vendor.pth``. Python uses
``.pth`` files to dynamically add directories to ``sys.path`` (`docs
-<http://docs.python.org/library/site.html>`_).
+<http://docs.python.org/library/site.html>`_)::
-The file format is simple. Consult ``vendor/vendor.pth`` for reference.
+ echo src/cheeseballs >> vendor-local/vendor.pth
+ git commit vendor-local/vendor.pth
Some packages (like ``html5lib`` and ``selenium``) are troublesome, because
their source lives inside an extra subdirectory ``src/`` inside their checkout.
@@ -141,7 +142,7 @@ it worked.
Testing Your Vendor Change
--------------------------
It's critical that you test your app running under mod_wsgi. Although you
-may use runserver day to day, go ahead and run some code through WSGI to
+may use runserver day to day, go ahead and run some code through WSGI to
prove vendor is setup properly. (throw an import into your view, etc)
Advanced Topics
Something went wrong with that request. Please try again.