I have structure like that
src/
setup.py
my_folder/
my_script.py
my_data.json
My .py file uses data from my_data.json and it simple points to it with path my_data.json, because it is rigth next to it? Yeah it works correctly when I run it normally by python my_script.py but when I try to make it via setup file and run it with some alias then it's clearly runs from /src directory and it doesn't see my my_data.json file because it should point to my_folder/my_data.json. When I print os.getcwd() then I see that my_script.py is run from /src directory, that's kind of weird...
My setup looks like this:
setup(
name='main',
entry_points={
'console_scripts': [
'my_alias = my_folder.my_script:main'
],
},
include_package_data=True,
packages=find_packages()
)
Do you have any idea how to force to run my script in his directory not directory where setup is placed?