Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #12373

Re: Questions about including tests/ directory into package

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Sandro Tosi <morph@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: Questions about including tests/ directory into package
Date Sat, 21 Mar 2020 00:50:01 +0100
Message-ID <zMzyN-7n2-13@gated-at.bofh.it> (permalink)
References <zLWQO-zz-3@gated-at.bofh.it> <zMzyN-7n2-15@gated-at.bofh.it>
X-Original-To debian-python <debian-python@lists.debian.org>
X-Mailbox-Line From debian-python-request@lists.debian.org Fri Mar 20 23:44:47 2020
Old-Return-Path <sandro.tosi@gmail.com>
X-Amavis-Spam-Status No, score=-6.5 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -5.5
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3TFp1z0T+c1wGEBmGNsUHWtHOoSYvAshQngEZDOfWSc=; b=fUuCXPwdd6bmQOEg0KQoqIeupdzTwvqqRAf5HbDjZ8t110dNAPPFouz3mRB+zkBPDr 4VowXDwbhf4vWQjNp4OMqU/EY9nR//1LZ2cpTAyDKqLljLS18+iKj/TA6+9Q+xEqsKEM uAlAIAFoYD2RHJ5HFD/6qPLwrvACoxo6Be9a+LdHwGFEUzBHYt8D/KCk3dBlqBW3CJvJ y1oWt2lFJRsb1XmA02qf3+pSgPQBUCYttSPtgx/uOoCaoJQ1yGTWhv0wKZV/Gasi/uPk 62gw0a+BocKP+ppefSHJvnSX7k5lDtyZaD/KrRi0jg3uc9ToHyZlHJT71pgJQkFDd9b6 MqyA==
X-Gm-Message-State ANhLgQ3B+wfikYY3KCO0j0/XUTMZVpjDkY39E7NY803a8bcrZrFvMmFp 5Zak23yR09v9eHsXAPkC1KVbYDfKKLSpDhgmiayFZ0Tt
X-Google-SMTP-Source ADFU+vvvnQgftW+FH/vtH3qtGZMbbag6q3uuvnTz29F91uQPQkG8JNWISdFSIgcFTMg7L+4FxdQ+KDHHQe5sRauWnEc=
X-Received by 2002:a05:620a:95b:: with SMTP id w27mr7217325qkw.238.1584747870740; Fri, 20 Mar 2020 16:44:30 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Mailing-List <debian-python@lists.debian.org> archive/latest/18019
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/CAB4XWXxVUm9pDri29EgGrUB=YLeTRteQ2QFDa5jxAVvjJ47uBA@mail.gmail.com
Approved robomod@news.nic.it
Lines 22
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Fri, 20 Mar 2020 19:44:04 -0400
X-Original-Message-ID <CAB4XWXxVUm9pDri29EgGrUB=YLeTRteQ2QFDa5jxAVvjJ47uBA@mail.gmail.com>
X-Original-References <CAGzOMC8pnRLnB=RSxKmKAJzGrzDpYA1dfuapW7=p6JCMTxNQ=g@mail.gmail.com> <825a3cf2-b7bf-b1a4-2927-112decdf865e@debian.org>
Xref csiph.com linux.debian.maint.python:12373

Show key headers only | View raw


> packages=find_packages("src"),
>
> Setuptools will only find "tinyalign" under the "src" folder, as a
> python module to package, which is why that's the only thing that is
> going to be packaged.
>
> IMO, the best approach to this problem is to convince upstream to move
> their tests folder into the Python package folder. Best is even to make
> upstream get rid of the "src" folder, rename that one "tinyalign" and
> put the tests folder in it. In other words, make upstream do:

that's not correct: the "src" directory is a very well know
best-practice (you can google for it, if you need references),
intended to avoid situations where "import mymodule" will have
inconsistent results depending on where you run that command and easy
of testing.

-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
Twitter: https://twitter.com/sandrotosi

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Questions about including tests/ directory into package Sao I Kuan <saoikuan@gmail.com> - 2020-03-19 07:30 +0100
  Re: Questions about including tests/ directory into package Diane Trout <diane@ghic.org> - 2020-03-19 19:00 +0100
    Re: Questions about including tests/ directory into package Sao I Kuan <saoikuan@gmail.com> - 2020-03-20 12:30 +0100
  Re: Questions about including tests/ directory into package Sandro Tosi <morph@debian.org> - 2020-03-21 00:50 +0100

csiph-web