0

I'm currently trying to upload a python module to PyPi. My setup.py file is currently coded as below to locate the packages.

setup.py (simplified)

from setuptools import setup, find_packages
setup(
   # other specifications
   packages=find_packages()
)

However, the package I'm trying to upload has the following directory structure.

main_folder
|
|--nest_folder
|  |
|  |--nested.json
|  |--nested.py
|  |--nested.txt
|
|---__init__.py
|---other.py

With my setup file, it's able to locate __init__.py and other.py but is unable to find any of the files in the nested_foler. In other words, it only builds those two files, leaving the files in the nested folder out of the module's build.

Is there a way to build the entire main_folder into a module and upload this to PyPi?

Haru Frost
  • 237
  • 1
  • 12
  • 1
    I could be wrong, but perhaps add a __init__.py in ```nest_folder```? – ewokx Feb 14 '22 at 06:20
  • no you are right. adding `__init__,py` worked partially. It now recognizes the python files in the nested directory but it doesn't seem to grab the json or txt files. – Haru Frost Feb 14 '22 at 06:26
  • https://stackoverflow.com/q/11848030/7976758 – phd Feb 14 '22 at 13:23

0 Answers0