public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-python <gentoo-python@lists.gentoo.org>
Cc: dev-portage@gentoo.org
Subject: [gentoo-python] Looking for improvements for python-r1, to support sys-apps/portage better
Date: Mon, 11 Aug 2014 00:29:29 +0200	[thread overview]
Message-ID: <20140811002929.079b27c6@pomiot.lan> (raw)

[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]

Hi, everybody.

I've recently worked on writing setup.py for Portage so that we could
start installing it like proper Python package. For my work, I've
written an ebuild that you can find in ::mgorny overlay [1]. Sadly,
a few things don't work properly.

I know I've pretty much screwed up python-r1 and made it overcomplex.
I'm looking for your suggestions how I could improve it, or at least
make my Portage ebuild work :).

The issue is that the Python script wrapping in distutils-r1 has been
designed for the common distutils concept of single scriptdir. However,
in case of Portage we're installing scripts to three different
locations -- one involving subdirectories.

The usual wrapping code assumes that passing --install-scripts= will
cause scripts to be installed in python-exec directory. However,
in Portage this variable isn't used. Even if it were, we wouldn't know
how to split the scripts into original directories afterwards. So I
think we can only do manual wrapping here.

However, the proper is that the script collide once merged to ${D}. We
install to sub-root but it is merged before leaving
distutils-r1_python_install. So we either need to hack that around even
more, or disable parallel install (== make it very slow for Portage).

A few possibilities that come to my mind include:

1. make whole python_install() work on sub-root, merge after leaving
it. This will be an incompatible change since ${D} will have to be
replaced by a custom variable.

2. add some implicit extra script wrapping support. Like
DISTUTILS_SCRIPT_DIRECTORIES=() that can specify additional locations
to look for scripts. Seems a bit overkill for a single case.

Any other ideas?

[1]:http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=blob;f=sys-apps/portage/portage-9999.ebuild

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

                 reply	other threads:[~2014-08-11 20:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20140811002929.079b27c6@pomiot.lan \
    --to=mgorny@gentoo.org \
    --cc=dev-portage@gentoo.org \
    --cc=gentoo-python@lists.gentoo.org \
    /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