Skip to content

Add MANIFEST.in file to fix source distribution#16

Merged
st3107 merged 1 commit intoxpdAcq:masterfrom
AbbyGi:add-manifest
Mar 2, 2021
Merged

Add MANIFEST.in file to fix source distribution#16
st3107 merged 1 commit intoxpdAcq:masterfrom
AbbyGi:add-manifest

Conversation

@AbbyGi
Copy link
Contributor

@AbbyGi AbbyGi commented Mar 2, 2021

Description:

We were updating CI for the NSLS-II PDF profile_collection repo and discovered an issue:

Traceback (most recent call last):
  File "/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3418, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-6bc5b1fc0a66>", line 11, in <module>
    ip.parent._exec_file(f)
  File "/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/IPython/core/shellapp.py", line 380, in _exec_file
    raise_exceptions=True)
  File "/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2742, in safe_execfile
    self.compile if shell_futures else None)
  File "/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/IPython/utils/py3compat.py", line 168, in execfile
    exec(compiler(f.read(), fname, 'exec'), glob, loc)
  File "/home/vsts/work/1/s/startup/94-load.py", line 17, in <module>
    from xpdacq.xpdacq_conf import (glbl_dict, configure_device,
  File "/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/xpdacq/xpdacq_conf.py", line 27, in <module>
    from xpdconf.conf import glbl_dict, GLBL_YAML_PATH
  File "/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/xpdconf/conf.py", line 65, in <module>
    glbl_dict = lookup_config()
  File "/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/xpdconf/conf.py", line 59, in lookup_config
    with open(sim_config_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/vsts/miniconda/envs/collection-2021-1.0/lib/python3.7/site-packages/xpdconf/examples/sim.yaml'

See this link for more details:
NSLS2/pdf-profile-collection#24

This pull request adds a missing MANIFEST.in file which is required to include non-Python files in the source distribution (.tar.gz file). We also made the xpdConf/tests directory a library to make it part of the source and binary distribution.

Before the fix:

xpdconf-0.4.2
├── PKG-INFO
├── README.md
├── setup.cfg
├── setup.py
├── xpdconf
│   ├── __init__.py
│   └── conf.py
└── xpdconf.egg-info
    ├── PKG-INFO
    ├── SOURCES.txt
    ├── dependency_links.txt
    ├── not-zip-safe
    └── top_level.txt

After the fix:

xpdconf-0.4.2
├── AUTHORS.txt
├── CHANGELOG.rst
├── LICENSE
├── MANIFEST.in
├── PKG-INFO
├── README.md
├── setup.cfg
├── setup.py
├── xpdConf
│   ├── __init__.py
│   ├── conf.py
│   ├── examples
│   │   ├── pdf.yaml
│   │   ├── sim.yaml
│   │   ├── sim_db.yaml
│   │   └── xpd.yaml
│   └── tests
│       ├── __init__.py
│       ├── test_base_dir.py
│       ├── test_conf.py
│       └── test_loadyaml.py
└── xpdconf.egg-info
    ├── PKG-INFO
    ├── SOURCES.txt
    ├── dependency_links.txt
    ├── not-zip-safe
    └── top_level.txt

@mrakitin
Copy link
Contributor

mrakitin commented Mar 2, 2021

We package it with conda from https://github.com/nsls-ii-forge/xpdconf-feedstock/blob/9ebbb818124aa8f817d2fda8408261783e7ac6f0/recipe/meta.yaml#L9, and that uploaded artifact is missing the examples .yaml files.

@mrakitin
Copy link
Contributor

mrakitin commented Mar 2, 2021

@st3107, will you be able to review/merge it and cut a new release after the fix? We would like to have our nsls2forge package ready for the next deployment.

@st3107
Copy link
Collaborator

st3107 commented Mar 2, 2021

Thank you for the fix.

@mrakitin
Copy link
Contributor

mrakitin commented Mar 2, 2021

@AbbyGi, we overlooked the case-sensitivity of the directory in MANIFEST.in, I got a fix in #17.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants