I am creating pip package and before submitting I would like to try it. For simplification, lets assume that python script looks like this:
def foo():
print("Hello World!")
My setup.py
containing metadata looks like:
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="test_super_secret",
version="1.0",
description="testing pip version 1",
packages=find_packages(),
)
I have compiled script using Wheel
, so that I'm able to install it via pip :
user@pc:$ python -m pip install dist/test_super_secret-1.0-py2-none-any.whl
Processing ./dist/test_super_secret-1.0-py2-none-any.whl
Installing collected packages: test-super-secret
Successfully installed test-super-secret-1.0
However, when I'm not able to import such module from python:
>>> import test-super-secret
File "<stdin>", line 1
import test-super-secret
^
SyntaxError: invalid syntax
What am I doing wrong? Should I import it in another way or should I change setup so that it would be possible to import module?
EDIT:
Module can not be imported even if it is called testsupersecret
in the setup.py
:
>>> import testsupersecret
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named testsupersecret