From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: Packaging ufw Date: Sat, 10 Nov 2018 22:25:59 +0100 Message-ID: <20181110222559.28ad2d00@scratchpost.org> References: <87ftw8aj0f.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/=CZoM0jRBc4KzIhwTO7eupn"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLali-00060p-AP for guix-devel@gnu.org; Sat, 10 Nov 2018 16:26:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLalb-0006TJ-3F for guix-devel@gnu.org; Sat, 10 Nov 2018 16:26:11 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:50578) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gLala-0006J6-Rj for guix-devel@gnu.org; Sat, 10 Nov 2018 16:26:07 -0500 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: swedebugia Cc: guix-devel@gnu.org --Sig_/=CZoM0jRBc4KzIhwTO7eupn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Sat, 10 Nov 2018 21:42:38 +0100 swedebugia wrote: > I need help. >=20 > It fails with >=20 > starting phase `install' > running "python setup.py" with command "install" and parameters=20 > ("--prefix=3D/gnu/store/v8kzgqs1jdfg7wzqr9c02719ada6x8bm-ufw-0.35"=20 > "--single-version-externally-managed" "--root=3D/" "--root=3D/") > Found=20 > '/gnu/store/8assqq8vmmvn09cysg5nm3kf2075hvxd-iptables-1.6.2/sbin/iptables= '=20 > version '1.6.2\n'' > usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] > =C2=A0=C2=A0 or: -c --help [cmd1 cmd2 ...] > =C2=A0=C2=A0 or: -c --help-commands > =C2=A0=C2=A0 or: -c cmd --help >=20 > error: option --single-version-externally-managed not recognized >=20 > This option comes from the python-build-system. Yes, and it elaborates (in guix/guix/build/python-build-system.scm): >;; Pip behaves a bit different then easy_install: it always executes >;; "setup.py" with the option "--single-version-externally-managed" set. = This >;; makes setuptools' "install" command run the original "install" command >;; instead of the "easy_install" command, so no .pth file (and no site.py) >;; will be created. The "site-packages" directory only contains the packa= ge >;; and the related .egg-info directory. >;; >;; This is exactly what we need for Guix and this is what we mimic in the >;; install phase below. >(define* (install #:key outputs (configure-flags '()) use-setuptools? > #:allow-other-keys) > "Install a given Python package." > (let* ((out (assoc-ref outputs "out")) > (params (append (list (string-append "--prefix=3D" out)) > (if use-setuptools? ^---- Aha! > ;; distutils does not accept these flags > > (list "--single-version-externally-managed" > "--root=3D/") > '()) > configure-flags))) > (call-setuppy "install" params use-setuptools?) > #t)) Try specifying (arguments `(#:use-setuptools? #f)) in the package. But if ufw doesn't use "--single-version-externally-managed", that implies that ufw is not available on PyPI. Weird. --Sig_/=CZoM0jRBc4KzIhwTO7eupn Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvnTOcACgkQ5xo1VCww uqXiXQf+KfrqBwyevvQxXTGEpjSyPnjl1MOO6OvnIDOvhGt6TsKs++wZLDuha4nS /apCJV7eP0H4kOERqkJtjezViDcOr7U4KuCX18GAmH3vmxBKna+dFt4apK3aYLvP lqiRdt9kHJhQ/1QRywY+Ljp2vqkECr75NVronkrdsxm7u0BtEROyLKZHlZAPzeol E3wAl8v92glc+ShdR92S0eWtvaaaOet8/uqzpK6Qjb5sxczSqpE5/EiQqPQSuEgf P2RnxlAs80iKspmmnQlGr6/ThlrhTeVSO3IqLlIRusQSFk/neDM0C+pZweYKV0hi vMnE4CLh01+WBRsu8ahpIkASyWbm2w== =tLFb -----END PGP SIGNATURE----- --Sig_/=CZoM0jRBc4KzIhwTO7eupn--