anaconda-verify complains about namespace pth files.

0 views
Skip to first unread message

Max Linke

unread,
Jul 24, 2016, 11:22:15 AM7/24/16
to Anaconda - Public
Hi all

I have a package that I want to get anaconda-verify to pass. But
setuptools is always producing a `*.pth` file.

The module I want to package is [datreant.core]. It contains also a
[namespace package] called `datreant`.

With this package setuptools right now always creates a `*pth` file called.

datreant.core-0.7.0-py2.7-nspkg.pth

This looks like a path file generated by setuptools for the datreant
namespace package.

Is there a known way to stop setuptools from generating the `*pth` file?
Or would it be better to file an issue with anaconda-verify to allow
this special type of pth files?

best Max

[datreant.core]: https://github.com/datreant/datreant.core
[namespace package]:
https://github.com/datreant/datreant.core/blob/develop/src/datreant/__init__.py
meta.yaml

Ilan Schnell

unread,
Jul 24, 2016, 12:21:15 PM7/24/16
to Anaconda
Hello Max,

The most straightforward way to handle namespace packages in conda is to create a package which defines the namespace (in your case 'datreant'), which only contains a single empty datreant/__init__.py, and then make the other packages depend on this.  This is how we handle namespace packages in the Anaconda distribution.
defines the 'backports' namespace, and then other packages, such as
https://github.com/ContinuumIO/anaconda-recipes/tree/master/configparser
There are other ways to get around this problem, e.g. by preserving the egg directory which setuptools creates, but that is not as simple and clean (from a packaging perspective), and brings along other challenges.

- Ilan




--
Anaconda Community Support Group Brought to you by Continuum Analytics
--- You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.

Max Linke

unread,
Jul 24, 2016, 1:00:30 PM7/24/16
to anac...@continuum.io
Thanks Ilan it works now.

Btw is there a FAQ or something similar for anaconda-verify where such
solutions are collected?

best Max
> <mailto:anaconda%2Bunsu...@continuum.io>.
> To post to this group, send email to anac...@continuum.io
> <mailto:anac...@continuum.io>.
> --
> Anaconda Community Support Group Brought to you by Continuum Analytics
> ---
> You received this message because you are subscribed to the Google
> Groups "Anaconda - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to anaconda+u...@continuum.io
> <mailto:anaconda+u...@continuum.io>.
> To post to this group, send email to anac...@continuum.io
> <mailto:anac...@continuum.io>.

Ilan Schnell

unread,
Jul 24, 2016, 10:31:50 PM7/24/16
to Anaconda
Thanks for the suggestion.  I started a FAQ file to collect the answer to common problems:
https://github.com/ContinuumIO/anaconda-verify/blob/master/FAQ.md

- Ilan

To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.
To post to this group, send email to anac...@continuum.io.
Reply all
Reply to author
Forward
0 new messages