I am using setup.py
to create a python package, which I want to install via pip
. To correctly install the files under
lib/python2.7/site-packages/<package-name>
I used the following option in setup.py
:
'package_dir': {'':'lib'}
as described here but get an error
error: package directory 'lib' does not exist
Well, there is no such directory as I want the current directory to be installed as package lib
or whatever. I also tried to use
'package_dir': {'mycode':''}
which installes the code directly in
lib/python2.7/site-packages/
and not under
lib/python2.7/site-packages/<package-name>
What am I doing wrong, and where is this documented? I might overlooked the documentation of this basic feature as the documentation for setup.py
is 'suboptimal'.