I wrote a small python program and now I want to install and use it on my system.
Program structure:
projectname
|--src
| |--main.py #import file1
| |--file1.py #import file2
| |--file2.py
|--LICENSE
|--README.md
|--setup.py
I did sudo python setup.py install, but now I only able to run it with /usr/bin/main.py. What should I do, to be able to run it by only typing a projectname?
EDIT: Setup.py content:
setuptools.setup(
name="projectname",
version="0.0.1",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
entry_points={
"console_scripts": [
"projectname = projectname.src/main:main"
]
},
python_requires='>=3.6',
)