forked from aibor/marmoset
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
After installing marmoset with setuptools, manually working around #52 , marmoset is unable to be started via the script provided:
root@archlinux:~/marmoset# marmoset.py
Traceback (most recent call last):
File "/usr/bin/marmoset.py", line 7, in <module>
__import__('pkg_resources').run_script('marmoset==0.5.0', 'marmoset.py')
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 724, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1650, in run_script
exec(code, namespace, namespace)
File "/usr/lib/python3.5/site-packages/marmoset-0.5.0-py3.5.egg/EGG-INFO/scripts/marmoset.py", line 7, in <module>
marmoset.run()
AttributeError: module 'marmoset' has no attribute 'run'
The issue is the one I discussed earlier with @bastelfreak , since the script has the same name as the provided package, it only works if the script is in the same directory as the package "marmoset". Since the current directory is always first in the path, it will import the script itself otherwise. To demonstrate this, I added the run function to the script in "/usr/lib/python3.5/site-packages/marmoset-0.5.0-py3.5.egg/EGG-INFO/scripts/marmoset.py":
def run():
print("Ich bin nur das Skript!")
root@archlinux:~/marmoset# marmoset.py
Ich bin nur das Skript!
The easiest way to solve this would probably be to rename the python package to differ from the actual script name.
Metadata
Metadata
Assignees
Labels
No labels