Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.
This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Cannot install nested data directories #48

Closed

Description

@pllim

My project has:

packagename
    data
        *.dat
        *.txt
        wavecats
             *.fits
             *.txt

Here is how I define it in packagename/setup_package.py:

def get_package_data():
    return {
        'packagename': ['data/*.txt', 'data/*.dat', 'data/wavecats/*.dat',
                         'data/wavecats/*.txt']}

This is the error I get when I run setup.py install:

error: can't copy 'stsynphot/data/wavecats': doesn't exist or not a regular file

This used to work until I updated my affiliated package codes with the latest setup scripts from this repo.

Activity

  1. embray commented on Apr 28, 2014

    @embray
    Member

    Could you link to a branch or something with this exact setup and code hierarchy? It would be easier to check what's going on that way.

  2. embray commented on Apr 28, 2014

    @embray
    Member

    Well right now I don't get very far. When I try to run ./setup.py build it sits there for a long time and then I get

    Traceback (most recent call last):
      File "./setup.py", line 37, in <module>
        __import__(PACKAGENAME)
      File "/internal/1/root/src/stsynphot/refac-modeling/stsynphot/__init__.py", line 14, in <module>
        from .spectrum import band, ebmvx, Vega
      File "/internal/1/root/src/stsynphot/refac-modeling/stsynphot/spectrum.py", line 22, in <module>
        from synphot.models import Empirical1D
    ImportError: No module named models
    

    This is using the latest synphot package. When I do import synphot.models in the Python command-line I also get an import error as well as this message:

    INFO: synphot config is searching for the most current spectra files. Please be patient... [synphot]
    

    Should it be doing that when running setup.py?

  3. pllim commented on Apr 30, 2014

    @pllim
    MemberAuthor

    Update: https://github.com/spacetelescope/pysynphot should be fully functional now but it still needs jwstlib.modeling

  4. pllim commented on May 1, 2014

    @pllim
    MemberAuthor

    I fixed it by changing setup.py package data definition from 'data/*' to 'data/*.*' (and in my case, also added 'data/wavecats/*'). Because 'data/*' glob includes 'data/wavecats/' directory itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions