From: muradm <mail@muradm.net>
To: Antwane Mason <ad.mason1413@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: How to Write Empty File in Build Phase?
Date: Fri, 27 Aug 2021 20:39:36 +0300 [thread overview]
Message-ID: <874kbadbqt.fsf@muradm.net> (raw)
In-Reply-To: <CAAztfg+KVSqhhAGuR7jm4ojK6BmYxfjfarmiPF43Fc3nctABBQ@mail.gmail.com>
May be something like this? (e-mail adhoc typing, may require
fixing)
(define-public python-verspec
(package
(name "python-verspec")
(version "0.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "verspec" version))
(sha256
(base32
"07n06wv85fm4vl1ird2mja0823js3x322wgs9gdnq1djjyk4ql64"))
(modules '((guix build utils)))
(snippet
'(with-directory-excursion "test"
(with-output-to-file "__init__.py"
(newline))))))
(build-system python-build-system)
(native-inputs
`(("python-coverage" ,python-coverage)
("python-flake8" ,python-flake8)
("python-mypy" ,python-mypy)
("python-pretend" ,python-pretend)
("python-pytest" ,python-pytest)))
(home-page
"https://github.com/jimporter/verspec")
(synopsis "Flexible version handling")
(description "Flexible version handling")
(license '(license:asl2.0 license:bsd-2))))
You can use (snippet of (origin, that allows pre phases actions on
source before
any build steps/phases. (with-directory-excursion will basically
"cd" to "test"
directory, (with-output-to-file will open file named
"__init__.py", (newline)
will write empty line to just opened file.
Antwane Mason <ad.mason1413@gmail.com> writes:
> Hello,
>
> I am currently working to resolve a build issue of
> python-verspec with the ultimate goal of submitting a package
> for this
> package, onlykey-cli, and all other dependencies required for
> onlykey-cli. Onlykey is a hardware password manager, second
> factor authenticator, and private key storage manager. A working
> solution to the build problem is to include an empty
> __init__.py file in the test folder of the source code. How do I
> write this file during a build phase?
>
> Here is the package definition for reference.
> -----------------------------------
> (define-public python-verspec
> (package
> (name "python-verspec")
> (version "0.1.0")
> (source
> (origin
> (method url-fetch)
> (uri (pypi-uri "verspec" version))
> (sha256
> (base32
> "07n06wv85fm4vl1ird2mja0823js3x322wgs9gdnq1djjyk4ql64"))))
> (build-system python-build-system)
> (native-inputs
> `(("python-coverage" ,python-coverage)
> ("python-flake8" ,python-flake8)
> ("python-mypy" ,python-mypy)
> ("python-pretend" ,python-pretend)
> ("python-pytest" ,python-pytest)))
> (home-page
> "https://github.com/jimporter/verspec")
> (synopsis "Flexible version handling")
> (description "Flexible version handling")
> (license '(license:asl2.0 license:bsd-2))))
> -----------------------------------
>
> Regards,
> Antwane
next prev parent reply other threads:[~2021-08-27 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 16:44 How to Write Empty File in Build Phase? Antwane Mason
2021-08-27 17:39 ` muradm [this message]
2021-08-28 12:40 ` Antwane Mason
2021-08-28 14:07 ` Tobias Geerinckx-Rice
2021-08-29 12:48 ` Antwane Mason
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=874kbadbqt.fsf@muradm.net \
--to=mail@muradm.net \
--cc=ad.mason1413@gmail.com \
--cc=guix-devel@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.