mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] django: new package to provide Django 1.6.5
Date: Thu, 31 Jul 2014 11:08:32 +0200	[thread overview]
Message-ID: <20140731090832.GD29377@pengutronix.de> (raw)
In-Reply-To: <20140731084409.GU6146@pengutronix.de>

On Thu, Jul 31, 2014 at 10:44:09AM +0200, Uwe Kleine-König wrote:
> On Thu, Jul 31, 2014 at 10:14:14AM +0200, Michael Olbrich wrote:
> > On Wed, Jul 30, 2014 at 08:12:35PM +0200, Uwe Kleine-König wrote:
> > > +# ----------------------------------------------------------------------------
> > > +# Compile
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/django.compile:
> > > +	@$(call targetinfo)
> > > +	cd $(DJANGO_DIR) && \
> > > +		$(DJANGO_PATH) $(DJANGO_MAKE_ENV) \
> > > +		$(CROSS_PYTHON) setup.py build
> > 
> > I think the prefix should be added here as well, in case it's used in some
> > code generation etc.
> I wondered about that, too, but:
> 
> 	.../Django-1.6.5$ python setup.py build --prefix=/usr
> 	usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
> 	   or: setup.py --help [cmd1 cmd2 ...]
> 	   or: setup.py --help-commands
> 	   or: setup.py cmd --help
> 
> 	error: option --prefix not recognized

ok, keep it as is.

> 
> > > +	@$(call touch)
> > > +
> > > +# ----------------------------------------------------------------------------
> > > +# Install
> > > +# ----------------------------------------------------------------------------
> > > +
> > > +$(STATEDIR)/django.install:
> > > +	@$(call targetinfo)
> > > +	cd $(DJANGO_DIR) && \
> > > +		$(DJANGO_PATH) $(DJANGO_MAKE_ENV) \
> > > +		$(CROSS_PYTHON) setup.py install --root=$(DJANGO_PKGDIR) --prefix=/usr -O2
> > 
> > Why '-O2' here and not in the compile stage?
> Same thing here:
> 
> 	.../Django-1.6.5$ python setup.py build -O2
> 	usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
> 	   or: setup.py --help [cmd1 cmd2 ...]
> 	   or: setup.py --help-commands
> 	   or: setup.py cmd --help
> 
> 	error: option -O not recognized
> 
> and this is not specific to Django. I see the same with my custom python
> script that uses plain distutils.

dito.

> 
> > > +	# everything but locales
> > > +	find "$(DJANGO_PKGDIR)" -type d -name locale -prune -o -type f -printf '/%P\n' | while read fn; do \
> > > +		$(call install_copy, django, 0, 0, 0644, -, $$fn); \
> > > +	done
> > 
> > I dislike just dumping everything in the package, e.g. the egg-info is not
> > needed. Install /usr/bin/django-admin.py explicitly and then use:
> > 
> > 	@cd /usr/lib/python$(PYTHON_MAJORMINOR)/site-packages/django/ && find ...
> > 
> > This way it breaks in case something went wrong and the directory is
> > missing.
> I didn't do that because your approach also breaks when the path for
> such packages changes. AFAIK this is the case for Python 3.
> But I don't care much and can use your approach.
> 
> > > +	# locales
> > > +	find "$(DJANGO_PKGDIR)" -type d -name locale -printf '/%P\n' | while read localedir; do \
> > > +		for locale in $(DJANGO_LOCALES-y); do \
> > > +			find "$(DJANGO_PKGDIR)$$localedir/$$locale" -type f -printf "$$localedir/$$locale/%P\n" | while read fn; do \
> > 
> > Same here with 'cd' and I think the django.po files are not needed, just
> > the Python stuff and the compiled django.mo
> 
> 	.../Django-1.6.5$ find django -type d -name locale  | wc -l
> 	14
> 
> should I really list all these explicitly?

What I meant is:

	cd "$(DJANGO_PKGDIR)" && find ...
		for locale in $(DJANGO_LOCALES-y); do
			cd "$(DJANGO_PKGDIR)$$localedir/$$locale" && find ...

Michael

> 
> Best regards
> Uwe
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-07-31  9:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 18:12 Uwe Kleine-König
2014-07-31  8:14 ` Michael Olbrich
2014-07-31  8:44   ` Uwe Kleine-König
2014-07-31  9:08     ` Michael Olbrich [this message]
2014-07-31  9:17       ` Uwe Kleine-König
2014-07-31  9:59         ` Michael Olbrich
2014-07-31 19:34           ` [ptxdist] [PATCH v2] " Uwe Kleine-König

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=20140731090832.GD29377@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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