Search code examples
pythongoogle-drive-apipackagecondaconda-build

How to fix error when building conda package related to "Icon" file?


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?


Solution

  • 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.