unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Reza Housseini <reza.housseini@gmail.com>
To: help-guix@gnu.org
Subject: Python "src" layout not working correctly with pyproject-build-system
Date: Mon, 21 Nov 2022 12:01:47 +0100	[thread overview]
Message-ID: <a95e33bc-1314-4867-3417-b86f84e77e4d@gmail.com> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 1820 bytes --]

Hi list

I'm packaging a project with pyproject-build-system which follows the 
src layout in python:

(define-public python-cfd-qsense
   (package
     (name "python-cfd-qsense")
     (version "d02178fc02cfef00d7fa0584d552614e9bdf4c5e")
     (source (origin
	      (method git-fetch)
	      (uri (git-reference
		    (url "https://gitlab.com/hsr-iet/wabesense/cfd_qsense.git")
		    (commit version)))
	      (file-name (git-file-name name version))
	      (sha256
	       (base32
		"1ys5my2kfsr5w94k619qrdjm5wa7j45z11dw2ib2ha0wpc85aw4x"))))
     (build-system pyproject-build-system)
     (arguments
      `(#:tests? #f ;; error in test suite
        #:phases
        (modify-phases %standard-phases
	 (replace 'check
	   (lambda* (#:key tests? #:allow-other-keys)
	     (when tests?
	       (invoke "python" "-m" "unittest")))))))
     (propagated-inputs (list
			python-numpy
			python-scipy
			python-matplotlib
			python-pyaml
			python-pandas
			python-numpy-stl
			python-coolprop))
     (home-page "https://gitlab.com/hsr-iet/wabesense/cfd_qsense")
     (synopsis
      "CFD simulation tool to produce pressure-discharge curve for water 
spring taps.")
     (description
      "CFD simulation tool to produce pressure-discharge curve for water 
spring taps.")
     (license license:gpl3)))

When inheriting from this package like so:

(package
   (inherit python-cfd-qsense)
   (source (local-file %source-dir #:recursive? #t)))))

it is no longer importable as module cfd_qsense instead I have to import 
src.cfd_qsense. Why is this behavior, when using the package as is 
everything works fine.

Thanks for any help.

Cheers,

-- 
Reza Housseini

This message is signed with my GnuPG key:

     C0F3 0812 9AF2 80F4 0830 C2C1 C375 C6AF 0512 5C52

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 15557 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2022-11-21 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 11:01 Reza Housseini [this message]
2022-11-21 12:09 ` Python "src" layout not working correctly with pyproject-build-system Wojtek Kosior via
2022-11-21 14:03   ` Reza Housseini
2022-11-21 14:40     ` Wojtek Kosior via

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a95e33bc-1314-4867-3417-b86f84e77e4d@gmail.com \
    --to=reza.housseini@gmail.com \
    --cc=help-guix@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).