git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>, Karl Wiberg <kha@treskal.com>
Subject: Re: [ANNOUNCE] Stacked Git 0.15
Date: Mon, 26 Oct 2009 10:32:07 +0000	[thread overview]
Message-ID: <b0943d9e0910260332x1ca40f97r351e94f5baeb1c6b@mail.gmail.com> (raw)
In-Reply-To: <b0943d9e0910251013v19fb39b7we412e7f734c2755f@mail.gmail.com>

2009/10/25 Catalin Marinas <catalin.marinas@gmail.com>:
> 2009/10/25 Jakub Narebski <jnareb@gmail.com>:
>> Catalin Marinas <catalin.marinas@gmail.com> writes:
>>
>>> StGit is a Python application providing functionality similar to Quilt
>>> (i.e. pushing/popping patches to/from a stack) on top of Git. These
>>> operations are performed using Git commands, and the patches are
>>> stored as Git commit objects, allowing easy merging of the StGit
>>> patches into other repositories using standard Git functionality.
>>>
>>>   Download:         http://download.gna.org/stgit/stgit-0.15.tar.gz
>>>   Main repository:  git://repo.or.cz/stgit.git
>>>   Project homepage: http://www.procode.org/stgit/
>>>   Mailing list:     git@vger.kernel.org (please use "StGit" in the subject)
>>>   Bug tracker:      https://gna.org/bugs/?group=stgit
>>
>> Is there RPM or SRPM (src.rpm) available somewhere? Or does tarball
>> include *.spec file, or an rpm target?
>
> Late last night when running my release script I realised that
> setup.py no longer accepts the --prefix=/usr option I used for RPMs.
> I'll try to build one in the next couple of days (I wasn't even sure
> anyone was using it).

The problem was a bit more complicated than this. Some files are
generated by the Makefile rather than setup.py so using the latter
directly fails to build anything.

So it's time for 0.15.1 this week with the fix below (in my "proposed"
branch). I cc'ed Karl as well in case he has time to have a quick
look.

Fix setup.py to generate the needed files

From: Catalin Marinas <catalin.marinas@gmail.com>

StGit was relying on Makefile to generate some files but this breaks
using setup.py directly for targets like rpm.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
 Makefile  |   20 +++++---------------
 setup.cfg |    2 +-
 setup.py  |   17 ++++++++++++++---
 3 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/Makefile b/Makefile
index 0fa5c6a..5f88f7d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,20 +4,10 @@ PYTHON	?= python

 TEST_PATCHES ?= ..

-all: build
+all:
 	$(PYTHON) setup.py build

-build: stgit/commands/cmdlist.py stgit-completion.bash
-
-ALL_PY = $(shell find stgit -name '*.py')
-
-stgit/commands/cmdlist.py: $(ALL_PY)
-	$(PYTHON) stg-build --py-cmd-list > $@
-
-stgit-completion.bash: $(ALL_PY)
-	$(PYTHON) stg-build --bash-completion > $@
-
-install: build
+install:
 	$(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force

 doc:
@@ -29,10 +19,10 @@ install-doc:
 install-html:
 	$(MAKE) -C Documentation install-html

-test: build
+test:
 	cd t && $(MAKE) all

-test_patches: build
+test_patches:
 	for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \
 		stg goto $$patch && $(MAKE) test || break; \
 	done
@@ -53,5 +43,5 @@ tags:
 TAGS:
 	ctags -e -R stgit/*

-.PHONY: all build install doc install-doc install-html test test_patches \
+.PHONY: all install doc install-doc install-html test test_patches \
 	clean tags TAGS
diff --git a/setup.cfg b/setup.cfg
index 4359033..1eb8e9b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,2 @@
 [install]
-prefix: ~
+prefix: /usr
diff --git a/setup.py b/setup.py
index 3f5ccb2..12ed1db 100755
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,7 @@ import sys, glob, os
 from distutils.core import setup

 from stgit import version
+from stgit import commands, completion

 def __version_to_list(version):
     """Convert a version string to a list of numbers or strings
@@ -63,14 +64,24 @@ def __run_setup():
             ])

 # Check the minimum versions required
-if sys.argv[1] in ['install', 'build']:
-    __check_python_version()
-    __check_git_version()
+__check_python_version()
+__check_git_version()

 # ensure readable template files
 old_mask = os.umask(0022)

 version.write_builtin_version()
+
+# generate the python command list
+f = file('stgit/commands/cmdlist.py', 'w')
+commands.py_commands(commands.get_commands(allow_cached = False), f)
+f.close()
+
+# generate the bash completion script
+f = file('stgit-completion.bash', 'w')
+completion.write_completion(f)
+f.close()
+
 __run_setup()

 # restore the old mask



-- 
Catalin

  reply	other threads:[~2009-10-26 10:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-24 22:41 [ANNOUNCE] Stacked Git 0.15 Catalin Marinas
2009-10-24 23:20 ` Jakub Narebski
2009-10-25 17:13   ` Catalin Marinas
2009-10-26 10:32     ` Catalin Marinas [this message]
2009-10-26 13:49       ` Karl Wiberg
2009-10-26 16:23         ` Catalin Marinas
2009-11-02 10:05 ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0943d9e0910260332x1ca40f97r351e94f5baeb1c6b@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).