<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix.git/guix/import, branch merge-deploy</title>
<subtitle>Personal branch of https://git.savannah.gnu.org/cgit/guix.git/ for implementing 'guix deploy'.
</subtitle>
<id>https://www.git.jakob.space/guix.git/atom?h=merge-deploy</id>
<link rel='self' href='https://www.git.jakob.space/guix.git/atom?h=merge-deploy'/>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/'/>
<updated>2019-07-24T22:16:41Z</updated>
<entry>
<title>maint: Switch to Guile-JSON 3.x.</title>
<updated>2019-07-24T22:16:41Z</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-07-21T21:05:54Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=81c3dc32244a17241d74eea9fa265edfcb326f6d'/>
<id>urn:sha1:81c3dc32244a17241d74eea9fa265edfcb326f6d</id>
<content type='text'>
Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on
until now: it maps JSON dictionaries to alists (instead of hash tables),
and JSON arrays to vectors (instead of lists).  This commit is about
adjusting all the existing code to this new mapping.

* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro.
* configure.ac: Use it.
* doc/guix.texi (Requirements): Mention the Guile-JSON version.
* guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3.
* guix/import/cpan.scm (string-&gt;license): Expect vectors instead of
lists.
(module-&gt;dist-name): Use 'json-fetch' instead of 'json-fetch-alist'.
(cpan-fetch): Likewise.
* guix/import/crate.scm (crate-fetch): Likewise, and call 'vector-&gt;list'
for DEPS.
* guix/import/gem.scm (rubygems-fetch): Likewise.
* guix/import/json.scm (json-fetch-alist): Remove.
* guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of
'json-fetch-alist'.
(latest-source-release, latest-wheel-release): Call 'vector-&gt;list' on
RELEASES.
* guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch'
instead of 'json-fetch-alist'.
(lts-package-version): Use 'vector-&gt;list'.
* guix/import/utils.scm (hash-table-&gt;alist): Remove.
(alist-&gt;package): Pass 'vector-&gt;list' on the inputs fields, and default
to the empty vector.
* guix/scripts/import/json.scm (guix-import-json): Remove call to
'hash-table-&gt;alist'.
* guix/swh.scm (define-json-reader): Expect pair? or null? instead of
hash-table?.
[extract-field]: Use 'assoc-ref' instead of 'hash-ref'.
(json-&gt;branches): Use 'map' instead of 'hash-map-&gt;list'.
(json-&gt;checksums): Likewise.
(json-&gt;directory-entries, origin-visits): Call 'vector-&gt;list' on the
result of 'json-&gt;scm'.
* tests/import-utils.scm ("alist-&gt;package with dependencies"): New test.
* gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3.
* gnu/installer.scm (installer-program)[installer-builder]: Likewise.
* gnu/installer/locale.scm (iso639-&gt;iso639-languages): Use 'assoc-ref'
instead of 'hash-ref', and pass vectors through 'vector-&gt;list'.
(iso3166-&gt;iso3166-territories): Likewise.
* gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3.
* guix/docker.scm (manifest, config): Adjust for Guile-JSON 3.
* guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3.
* guix/import/github.scm (fetch-releases-or-tags): Update docstring.
(latest-released-version): Use 'assoc-ref' instead of 'hash-ref'.  Pass
the result of 'fetch-releases-or-tags' to 'vector-&gt;list'.
* guix/import/launchpad.scm (latest-released-version): Likewise.
</content>
</entry>
<entry>
<title>import: pypi: Preserve package name case when forming pypi-uri.</title>
<updated>2019-07-02T01:08:00Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-03-31T00:27:35Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=4b60ab8c006964d026dee8cf5f1260eba0b2bb81'/>
<id>urn:sha1:4b60ab8c006964d026dee8cf5f1260eba0b2bb81</id>
<content type='text'>
Fixes &lt;https://bugs.gnu.org/33046&gt;.

* guix/build-system/python.scm (pypi-uri): Update the host URI to
"files.pythonhosted.org".
* guix/import/pypi.scm (make-pypi-sexp): Preserve the package name case when
the source URL calls for it.
</content>
</entry>
<entry>
<title>import: pypi: Include optional test inputs as native-inputs.</title>
<updated>2019-07-02T01:08:00Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-03-29T03:12:26Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=d514276b93ccf168438bbd2892fbc64d5661106c'/>
<id>urn:sha1:d514276b93ccf168438bbd2892fbc64d5661106c</id>
<content type='text'>
* guix/import/pypi.scm (maybe-inputs): Add INPUT-TYPE argument, and use it.
(test-section?): New predicate.
(parse-requires.txt): Collect the optional test inputs, and return them as the
second element of the returned list.
(parse-wheel-metadata): Likewise.
(guess-requirements): Adapt.
(make-pypi-sexp): Likewise, and include the test inputs requirements as native
inputs in the returned package expression.

* tests/pypi.scm (test-requires.txt): Include a test section in the
test-requires.txt data.
(test-requires.txt-beaker): New variable.
("parse-requires.txt"): Adapt.
("parse-requires.txt - Beaker"): New test.
("parse-wheel-metadata, with extras"): Adapt.
("parse-wheel-metadata, with extras - Jedi"): Adapt.
("pypi-&gt;guix-package, no wheel"): Re-indent, and add the expected
native-inputs.
("pypi-&gt;guix-package, wheels"): Likewise.
</content>
</entry>
<entry>
<title>import: pypi: Completely mute the output of the "unzip" command.</title>
<updated>2019-07-02T01:08:00Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-06-12T02:36:39Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=f801c6215d8d5b2b21926d8cc41c0beb1f734108'/>
<id>urn:sha1:f801c6215d8d5b2b21926d8cc41c0beb1f734108</id>
<content type='text'>
* guix/import/pypi.scm (guess-requirements): Completely mute the output of the
"unzip" command.
</content>
</entry>
<entry>
<title>import: pypi: Fix typo in docstring.</title>
<updated>2019-07-02T01:08:00Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-06-12T02:34:23Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=73e83730607e34d5f89a7166fd1609342d954633'/>
<id>urn:sha1:73e83730607e34d5f89a7166fd1609342d954633</id>
<content type='text'>
* guix/import/pypi.scm (guess-requirements): Fix typo.
</content>
</entry>
<entry>
<title>import: pypi: Parse wheel METADATA instead of metadata.json.</title>
<updated>2019-07-02T01:08:00Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-03-28T04:26:03Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=f0190a5dcdc1882e5a058dc7f12bc7ccb166c63d'/>
<id>urn:sha1:f0190a5dcdc1882e5a058dc7f12bc7ccb166c63d</id>
<content type='text'>
With newer Wheel releases, there is no more metadata.json file; the METADATA
file should be used instead (see: https://github.com/pypa/wheel/issues/195).

This change updates our PyPI importer so that it uses the latter.

* guix/import/pypi.scm (define-module): Remove unnecessary modules and export
the PARSE-WHEEL-METADATA procedure.
(parse-wheel-metadata): Add procedure.
(guess-requirements): Use it.
* tests/pypi.scm (test-metadata): Test it.
</content>
</entry>
<entry>
<title>import: pypi: Support more types of archives.</title>
<updated>2019-07-02T01:07:59Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-03-28T04:26:02Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=c799ad7276dcc771912f4fc7edca400ea48b8ec2'/>
<id>urn:sha1:c799ad7276dcc771912f4fc7edca400ea48b8ec2</id>
<content type='text'>
This change enables the PyPI importer to look for requirements in a source
archive of a different type than "tar.gz" or "tar.bz2".  Also, scan the source
archive to find a requires.txt file.

* guix/import/pypi.scm: (guess-requirements)[tarball-directory]: Remove procedure.
[guess-requirements-from-source]: Use COMRESSED-FILE? to determine if an
archive type is supported, and some file extension logic that chooses either
"tar" or "unzip" as the extractor.  Search for the requires.txt file in the
archive instead of using a static, expected location.
(guess-requirements): Rename the TARBALL argument to ARCHIVE, to denote the
archive format is no longer bound specifically to the Tar format.
(compute-inputs): Likewise.
* tests/pypi.scm ("pypi-&gt;guix-package, no wheel"): Mock the requires.txt at a
non-standard location.
("pypi-&gt;guix-package, no usable requirement file."): New test.
</content>
</entry>
<entry>
<title>import: pypi: Deduplicate requirements.</title>
<updated>2019-07-02T01:07:59Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-03-28T04:26:01Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=cc9a77cd396f8932bec1b8c7ae9d829ea76f37ec'/>
<id>urn:sha1:cc9a77cd396f8932bec1b8c7ae9d829ea76f37ec</id>
<content type='text'>
* guix/import/pypi.scm (parse-requires.txt): Remove potential duplicates.
</content>
</entry>
<entry>
<title>import: pypi: Improve parsing of requirement specifications.</title>
<updated>2019-07-02T01:07:59Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-03-28T04:26:01Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=803fb336d62ea65990e263ce58d8552e04c9c038'/>
<id>urn:sha1:803fb336d62ea65990e263ce58d8552e04c9c038</id>
<content type='text'>
The previous solution was fragile and could leave unwanted characters in a
requirement name, such as '[' or ']'.

Partially fixes &lt;https://bugs.gnu.org/33047&gt;.

* guix/import/pypi.scm (use-modules): Export SPECIFICATION-&gt;REQUIREMENT-NAME
(%requirement-name-regexp): New variable.
(clean-requirement): Rename to...
(specification-&gt;requirement-name): this, which now uses
%requirement-name-regexp to select the requirement name from the requirement
specification.
(parse-requires.txt): Adapt.
</content>
</entry>
<entry>
<title>import: pypi: Do not parse optional requirements from source.</title>
<updated>2019-07-02T01:07:59Z</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim.cournoyer@gmail.com</email>
</author>
<published>2019-03-28T04:26:00Z</published>
<link rel='alternate' type='text/html' href='https://www.git.jakob.space/guix.git/commit/?id=c4797121beea74ae93e3ce17677b9e72b8df920d'/>
<id>urn:sha1:c4797121beea74ae93e3ce17677b9e72b8df920d</id>
<content type='text'>
* guix/import/pypi.scm: Export PARSE-REQUIRES.TXT.
(clean-requirement): Move procedure to the top level.
(guess-requirements): Move the READ-REQUIREMENTS procedure to the top level,
and rename it to PARSE-REQUIRES.TXT.  Move the CLEAN-REQUIREMENT procedure to
the top level.  Move the COMMENT? functions inside the PARSE-REQUIRES.TXT
procedure.
(parse-requires.txt): Add a SECTION-HEADER? predicate, and use it to prevent
parsing optional requirements.

* tests/pypi.scm (test-requires-with-sections): New variable.
("parse-requires.txt, with sections"): New test.
</content>
</entry>
</feed>
