Building a python egg, first letter is incorrectly removed from root file/folder name

I’m trying to build an egg for my python project using setuptools, however, whenever I build an egg all of the contents are built with the first letter if each file/folder removed.

For example, my parent folder is called dp which gets renamed to p. I.e. when I unzip the egg file, I see a parent folder named p and another folder named GG-INFO (these should be named dp and EGG-INFO respectively). All of the other folders inside folder p are named correctly.

This is an issue because I reference functions in modules within that folder – e.g. from dp.module import function which doesn’t work because it complains about not finding the folder dp (which is true since for some reason it’s been renamed p).

My file looks like this:

from setuptools import setup, find_packages
    description="Data pipeline for XXX algorithm.",
    package_data={'': ['*.sql', '*.json', '*.txt']},
        "Programming Language :: Python :: 3"
    install_requires=['argparse', 'boto3', 'datetime', 'mmlspark', 'pandas', 'pyspark', 'pypandoc', 'scikit-learn',
                      'numpy', 'googleads', 'mlflow']

I’ve tried renaming the parent directory and the same thing happens. I’m running this via PyCharm (updated to the latest version) on Mac OS Mojave.

Would appreciate any ideas on how to fix this.

File Structure

Renamed folders

Stack Overflow Asked by Tim496 on July 22, 2020

1 Answers

One Answer

Give the wheel a try.

pip install wheel setuptools pip -U
pip wheel --no-deps --wheel-dir=build .

Answered by Nathan Buckner on July 22, 2020

Add your own answers!

Related Questions

Find a cell containing a specific date

1  Asked on December 22, 2021


Jeykll file to import not found or unreadable: base

1  Asked on December 22, 2021 by kyu96


Unable to remove event listener from document

1  Asked on December 22, 2021 by prawn


Invalid result adding the number of 1s in a binary number

2  Asked on December 20, 2021 by aworeham


How to print the elements of 3 different arrays by the order?

2  Asked on December 20, 2021 by fuzzyfiso


Finding string elements of an array in another array

5  Asked on December 20, 2021 by p-emt


How to plot several columns on the same line chart in R?

2  Asked on December 20, 2021 by user13953317


Is there a way to craft URLs to fill forms faster?

1  Asked on December 20, 2021 by rosalind-goh


infinite loop while using useEffect and redux store

0  Asked on December 20, 2021 by susanta


Cannot convert textfield into string

1  Asked on December 20, 2021 by anuj-amin


Is there multiple ways to cin vector elements?

1  Asked on December 20, 2021 by 2kbummer


Ask a Question

Get help from others!

© 2022 All rights reserved.