6

I honestly can't figure out what is happening with this error. I thought it was something in my manifest file but apparently it's not.

Note, this directory is in my Google Drive.

Here is my MANIFEST.in file:

graft soothsayer_utils
include setup.py
include LICENSE.txt
include README.md
global-exclude Icon*
global-exclude *.py[co]
global-exclude .DS_Store

I'm running conda build . in the directory and get the following error:

Packaging soothsayer_utils
INFO:conda_build.build:Packaging soothsayer_utils
INFO conda_build.build:build(2214): Packaging soothsayer_utils
Packaging soothsayer_utils-2022.01.19-py_0
INFO:conda_build.build:Packaging soothsayer_utils-2022.01.19-py_0
INFO conda_build.build:bundle_conda(1454): Packaging soothsayer_utils-2022.01.19-py_0
number of files: 11
Fixing permissions
Packaged license file/s.
INFO :: Time taken to mark (prefix)
        0 replacements in 0 files was 0.11 seconds
'site-packages/soothsayer_utils-2022.1.19.dist-info/Icon' not in tarball
'site-packages/soothsayer_utils-2022.1.19.dist-info/Icon\r' not in info/files
Traceback (most recent call last):
  File "/Users/jespinoz/anaconda3/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/cli/main_build.py", line 474, in main
    execute(sys.argv[1:])
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/cli/main_build.py", line 463, in execute
    outputs = api.build(args.recipe, post=args.post, test_run_post=args.test_run_post,
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/api.py", line 186, in build
    return build_tree(
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/build.py", line 3008, in build_tree
    packages_from_this = build(metadata, stats,
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/build.py", line 2291, in build
    newly_built_packages = bundlers[pkg_type](output_d, m, env, stats)
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/build.py", line 1619, in bundle_conda
    tarcheck.check_all(tmp_path, metadata.config)
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/tarcheck.py", line 89, in check_all
    x.info_files()
  File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/tarcheck.py", line 53, in info_files
    raise Exception('info/files')
Exception: info/files

Here's the complete log

I can confirm that the Icon files do not exist in my soothsayer_utils-2022.1.19.tar.gz file:

(base) jespinoz@x86_64-apple-darwin13 Downloads % tree soothsayer_utils-2022.1.19
soothsayer_utils-2022.1.19
├── LICENSE.txt
├── MANIFEST.in
├── PKG-INFO
├── README.md
├── setup.cfg
├── setup.py
├── soothsayer_utils
│   ├── __init__.py
│   └── soothsayer_utils.py
└── soothsayer_utils.egg-info
    ├── PKG-INFO
    ├── SOURCES.txt
    ├── dependency_links.txt
    ├── requires.txt
    └── top_level.txt

2 directories, 13 files

Can someone help me get conda build to work for my package?

O.rka
  • 29,847
  • 68
  • 194
  • 309
  • Yeah, it's strange - there is no other reference to Icon other than the manifest excluding it. Do you have a meta.yaml? – merv Feb 04 '22 at 06:55
  • Yea, it's right here: https://github.com/jolespin/soothsayer_utils/blob/master/meta.yaml – O.rka Feb 04 '22 at 20:29

1 Answers1

2

there are a few symptoms I would like to suggest looking into:

  1. There is a WARNING in your error log SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. You have MANIFEST.in, setup.py and setup.cfg probably conflicting between them. Because setup.py is the build script for setuptools. It tells setuptools about your package (such as the name and version) as well as which code files to include. Also, An existing generated MANIFEST will be regenerated without sdist comparing its modification time to the one of MANIFEST.in or setup.py, as explained here.

Please refer to Building and Distributing Packages with Setuptools, also Configuring setup() using setup.cfg files and Quickstart for more information

  1. Maybe not so important, but another thing worth looking into is the fact that there are 2 different python distributions being used at different stages, as Python 3.10 is used at: Using pip 22.0.2 from $PREFIX/lib/python3.10/site-packages/pip (python 3.10) (it is also in your conda dependencies) and Python 3.8 is used at: File "/Users/jespinoz/anaconda3/lib/python3.8/site-packages/conda_build/tarcheck.py", line 53, in info_files raise Exception('info/files') which is where the error happens. So maybe another configuration conflict related to this.
nferreira78
  • 1,013
  • 4
  • 17
  • 1
    The first point sounds like a solid lead. RE: the second point: the Python version that `conda build` runs in (here 3.8) has no constraint on the build environment in which packaging is done (here 3.10). The latter can be arbitrarily specified via a `--python` argument. – merv Feb 08 '22 at 00:24
  • Thanks for catching these errors. Would you recommend following these instructions instead of `python setup.py sdist`? https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives – O.rka Feb 09 '22 at 19:50
  • > Static metadata (`setup.cfg`) should be preferred. Dynamic metadata (`setup.py`) should be used only as an escape hatch when absolutely necessary. `setup.py` used to be required, but can be omitted with newer versions of `setuptools` and `pip`. So you can follow https://packaging.python.org/en/latest/tutorials/packaging-projects/ and at the end to generate your distribution packages simply do `python3 -m build`. However the Quickstart guide I provided is probably simpler to follow – nferreira78 Feb 10 '22 at 09:53
  • Ok, I'll try it with the setup.cfg and pyproject.toml files. It's a little more confusing this way since now there's 2 setup files. So do you need specify the packages needed to build both for the toml and cfg file? – O.rka Feb 15 '22 at 21:55
  • What ended up fixing my problem was as you suggested. I used `python -m build` with my current `setup.py` script and it worked like a charm. Takes a little longer but it works. – O.rka Feb 15 '22 at 23:57
  • Nice to know I could be of help, cheers – nferreira78 Feb 16 '22 at 09:13