Your problem is in this line:
package_dir = {'':'my_project'},
You're telling it that my_project
is the place to find top-level packages. So, find_packages('my_project')
is going to look for a package inside your top-level directory (my_project
) at my_project/my_project
. Since there is no such thing, you end up with an empty package.
Just remove that line, and everything will work.
While we're at it, you're over-complicating things a little bit. You're not using anything out of ez_setup
, so it would be simpler to remove the first two lines. And you're just adding a single static package, so there's really no reason to use find_packages
; you can just use packages = ['my_project']
instead.
Meanwhile, here's how to debug stuff yourself in the future.
First, don't try sudo python setup.py alias release register sdist bdist_egg upload
until you've actually got things working. It's a lot easier to debug local files than something you've already uploaded to PyPI. Just do python setup.py sdist
, then you can look at the resulting tarball and make sure it looks OK, then try pip install .
and/or pip install dist/my_project-0.0.1.tar.gz
to make sure it actually works.
Second, setup.py
is just normal Python code; you can always log things to see what's going on. For example, if find_packages('my_project')
doesn't seem to be working right, try doing a print(find_packages('my_project'))
before the setup(…)
to see what it's doing.