The main problem is that setup.py does not allow you to import modules from a parent directory.
.py from setuptools import setup, find_packages setup(name='mypackage', version='1.0', description='My package', url='https://github.com/myusername/mypackage', author='My Name', firstname.lastname@example.org', license='MIT', packages=find_packages(), # include all packages under src directory )
This code is setting up a Python package. The first line imports the setup and find_packages functions from the setuptools module. The setup function is used to configure the package. The name, version, description, url, author, author_email, and license arguments are all required. The packages argument tells setup which packages to include in the package. In this case, it includes all packages under the src directory.
import is a keyword in Python that allows you to load modules from a file. When you import a module, the module’s definitions and functions are made available to the current scope.
A parent directory is a directory that is above the current working directory. In Python, the parent directory is always the root directory.