Giter VIP home page Giter VIP logo

zerokspot.gitrecipe's Introduction

Important

This package is no longer actively maintained and therefor won't see any new features added to it. For more information please check out the wiki

This simple recipe for zc.buildout fetches data from a given repository and stores it into its part's directory. A simple task using this could look like this:

[myapp]
recipe=zerokspot.recipe.git
repository=git://github.com/zerok/zerokspot.gitrecipe.git
rev=7c73978b55fcadbe2cd6f2abbefbedb5a85c2c8c

This would store the repository under ${buildout:directory}/parts/myapp and keep it at exactly this revision, no matter what happens on the server.

The recipe has following options:

repository
The absolute URL of the repository to be fetched
rev
A revision/commit within this repository the environment should use.
branch
If you want to stay up to date with a certain branch other than "master", use this.
paths
List of relative paths to packages to develop. Must be used together with as_egg=true.
newest
This overrides the newest-option of the global setting for this part
as_egg
Set to True if you want the checkout to be registered as a development egg in your buildout.
cache-name
Name of the repository in the download-cache directory.
recursive
Follow submodules (Note that submodules are not cloned from the download cache).

Offline installation

If you want to install a part from the download-cache, this is now possible, too:

[buildout]
parts = myapp
download-cache = /var/cache/buildout
install-from-cache = true

[mylib]
recipe = zerokspot.recipe.git
repository = http://domain.com/repo.git

With this configuration, the recipe will look for /var/cache/buildout/repo and clone it into the local parts/ folder.

The recipe also supports an additional "cache-name" setting that lets you configure the folder name of the repository in the download cache.

zerokspot.gitrecipe's People

Contributors

zerok avatar svetlyak40wt avatar amotl avatar grzn avatar jezdez avatar matthewryanscott avatar

Stargazers

Angus H. avatar Marcin Nowak avatar  avatar Attila Oláh avatar Oleg Dolya avatar Sean Chen avatar 0x627832 avatar Taras Mankovski avatar Bradford Toney avatar Paul Osborne avatar  avatar Idan Gazit avatar Flo avatar Apkawa avatar Michael avatar Peter Quade avatar  avatar K. Adam Christensen avatar Russell Sim avatar Christian Metts avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

zerokspot.gitrecipe's Issues

update_cache does not fetch tags

consider the following scenario:

a part named "foo" is configured with rev=v1.0.0
when the developer ran ./bin/buildout for the first time, the clone had the v1.0.0 tag

later, the configuration changed to rev=v2.0.0
when the developer ran ./bin/buildout again, it got an Error: Failed to checkout revision

In this case, there was a cache in place, and newest=True (so _update_repository was called on the cache).

That is because _update_repository only does git pull, and doesn't fetch new tags (git fetch --tags).

Add ability to develop packages from subdirectory.

Use Case:
I have git repository that has src directory and all of the packages for this project are in that directory. I would like to be able to develop specific packages from that subdirectory.

Currently, this can not be done because the recipe assumes that the distutils file is in repository root.

Solution:
I added path option that allows the developer to indicate relative path of the package source files.

  • Tests passed before and after the code modification.
  • I tested this patch for my project and it worked
  • I did not add tests because there was no test for develop and I didn't want to write one from scratch :)

http://gist.github.com/208101

After the above patch, i replaced path for paths, so now you can develop multiple packages from the same git repo.

http://gist.github.com/208100

fatal: git checkout: --track and --no-track require -b

Hi, I'm checking out a non-master branch. Fresh buildout, as simple as I can make it. New to buildout, and git sometimes loses me, so its possible I'm missing something.

[buildout]
parts =
nsgeo
develop = .

[nsgeo]
recipe = zerokspot.recipe.git
repository=ssh://111.22.33.444/home/crucial/gits/gitpo.git
branch=nsgeo

cruxnu:ns crucial$ ./bin/buildout
Develop: '/Users/crucial/Sites/buildouttest/ns/.'
Installing nsgeo.
remote: Counting objects: 22756, done.
remote: Compressing objects: 100% (15710/15710), done.
remote: Total 22756 (delta 13961), reused 12778 (delta 6345)

fatal: git checkout: --track and --no-track require -b

cd parts/nsgeo
git status

On branch master

nothing to commit (working directory clean)

######## didn't get the branch at all

cruxnu:nsgeo crucial$ git branch

  • master

anyway, thanks so much for the gitrecipe !

1.5.1 seems to be broken

Installing 'zerokspot.recipe.git'.
We have no distributions for zerokspot.recipe.git that satisfies 'zerokspot.recipe.git'.
Getting distribution for 'zerokspot.recipe.git'.
Running easy_install:
/home/aatiis/work/gaenv/bin/python "-c" "from setuptools.command.easy_install import main; main()" "-mUNxd" "/home/aatiis/work/gaenv/wntdin/eggs/tmpuQwbWT" "-Z" "-q" "/tmp/tmp5CVZx7get_dist/zerokspot.recipe.git-0.5.1.tar.gz"
path=/home/aatiis/work/gaenv/wntdin/eggs/distribute-0.6.10-py2.5.egg

error: README.rst: No such file or directory
An error occured when trying to install zerokspot.recipe.git 0.5.1. Look above this message for any errors that were output by easy_install.

yup, the readme seems to be missing from the tarball.

install-from-cache & download-cache

its confusing to have
install-from-cache = false
but yet because buildout has
download-cache = true
it still uses the cache

we would set buildout to use the download-cache best efficiency for most eggs, but a git repo might be a working copy and would not want to use the cache.

and the copy that is cloned to the deployment has its origin set to the download-cache version, not the repo.
so git push goes to the download cache

and any buildout / update takes twice as long as it has to pull twice

I think if cache_install is false,
then do not use download_cache at all.
clone and pull directly from the repository

IMO its the principle of least astonishment (also less swearing)

with statements incopatible with python2.5

Hi,

I'd like to use this recipe with and appengine-based project, thus I'm using it in an environment where the default python is 2.5. Could you please add a "from future import with_statement" to the files that use the with statement? They do no harm in python2.6 anyway...

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.