From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: [PATCH 1/2] gnu: Add python-setproctitle and python2-setproctitle. Date: Wed, 19 Oct 2016 17:45:31 +0300 Message-ID: <20161019144531.GA17867@macbook42.flashner.co.il> References: <1474835077-19700-1-git-send-email-h.goebel@crazy-compilers.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bws7g-0001hZ-Rm for guix-devel@gnu.org; Wed, 19 Oct 2016 10:45:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bws7b-0002lB-U1 for guix-devel@gnu.org; Wed, 19 Oct 2016 10:45:40 -0400 Received: from flashner.co.il ([178.62.234.194]:58622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bws7b-0002jo-9O for guix-devel@gnu.org; Wed, 19 Oct 2016 10:45:35 -0400 Content-Disposition: inline In-Reply-To: <1474835077-19700-1-git-send-email-h.goebel@crazy-compilers.com> 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: Hartmut Goebel Cc: guix-devel@gnu.org --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 25, 2016 at 10:24:36PM +0200, Hartmut Goebel wrote: > * gnu/packages/python.scm (python-setproctitle, python2-setproctitle): > New variables. > --- > gnu/packages/python.scm | 58 +++++++++++++++++++++++++++++++++++++++++++= ++++++ > 1 file changed, 58 insertions(+) >=20 > diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm > index 688a5d4..95a2027 100644 > --- a/gnu/packages/python.scm > +++ b/gnu/packages/python.scm > @@ -10939,3 +10939,61 @@ with an associated set of resolve methods that k= now how to fetch data.") > provide extendible implementations of common aspects of a cloud so that = you can > focus on building massively scalable web applications.") > (license license:expat))) > + > +(define-public python-setproctitle > +(package > + (name "python-setproctitle") > + (version "1.1.10") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "setproctitle" version)) > + (sha256 > + (base32 > + "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2")))) > + (build-system python-build-system) > + (arguments > + '(#:phases > + (modify-phases %standard-phases > + (add-before 'check 'patch-Makefile > + ;; Stricly this is only required for the python2 variant. > + ;; But adding a phase in an inherited package seems to be > + ;; cumbersum. So we patch even for python3. > + (lambda _ ;* (#:key inputs #:allow-other-keys) > + (let ((nose (assoc-ref %build-inputs "python2-nose"))) > + (if nose > + (substitute* "Makefile" > + (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ") > + (string-append nose "/bin/nosetests ")))) > + #t))) > + (replace 'check > + (lambda _ > + (setenv "PYTHON" (or (which "python3") (which "python"))) IIRC (or ... here will return true, which i'm sure is not the point. > + (setenv "PYCONFIG" (or (which "python3-config") (which "pyt= hon-config"))) > + (setenv "CC" "gcc") > + ;; No need to extend PYTHONPATH so the built package will > + ;; be found, since the Makefile will build anyway > + (zero? (system* "make" "check")) > + ))))) These close perentheses should be on the previous line > + (native-inputs > + `(("procps" ,procps))) ; required for tests > + (home-page > + "https://github.com/dvarrazzo/py-setproctitle") > + (synopsis "Setproctitle implementation for Python to customize the pro= cess title") > + (description "The library allows a process to change its title (as > +displayed by system tools such as ps and top). > + > +Changing the title is mostly useful in multi-process systems, for > +example when a master process is forked: changing the children's title > +allows to identify the task each process is busy with. The technique > +is used by PostgreSQL and the OpenSSH Server for example.") > + (license license:bsd-3) > + (properties `((python2-variant . ,(delay python2-setproctitle)))))) > + > +(define-public python2-setproctitle > + (let ((base (package-with-python2=20 > + (strip-python2-variant python-setproctitle)))) > + (package > + (inherit base) > + (native-inputs `(("python2-nose" ,python2-nose) > + ,@(package-native-inputs base)))))) > --=20 > 2.7.4 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYB4cJAAoJEPTB05F+rO6TisAP/1mqHILDd8ridrf+NJTmIq9L cWujdEn6svoo0+5Iwy2TUBkz6ztuMpy7FI30Advs59PKqpGE5XfcFF0CJbszHUkr 90wpMNyteytqUUDM976WhQFJaB6bukFJE+1KI5cl1nZPwEKMcZ0Z+mX73rs2mS+/ hZfEUkcw4uaxuuOkTDTclrNK1uBOmgPe+92RLr9QQS4O7N4ST2vSshJlhvO2/lrn inbOnIX1d+x72l2I3M6jIS6LRP9Mp2FJNJiI47TBQzD4jqJEolYuQtv4mbTZ66g/ wy3J0xLRs40JY554QjJaf0F30kkaPIT9RlPgzRUKW7FkAmUxyo7L+EkfTpHcbiZ7 qIc50XcxpP+khagzS9C37kSudP5QDLYVcbB3vmFCqAtFkvf67DfXnUJO6ayI1zYw e263f7tJrUwFPEBkA0QI+PVCAuq9F5VZ2EGZRoqmn52pZdGEYMWNW2Pc9KClwyhI lXDZWHGNHbNFfqntr1jJ/UjwuNkEVPYv2A+Zj+OsFWR9oIBiL5+ZOJVysDvmg923 WXqSPl3re7q+gEl7u42rjN6O5sloSpkQUXdI00iuwoo7zGBc+dO/6AUGX4DOPqjV mxNOntHrqItx1uZp1YP181xN+Kol9yfRLv9raTK/Hh31agPjm8zQLqVLV9hYYcM7 sjAcvZBsz4NVdOzf/fr/ =9Mwu -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ--