Q:

Setup script with one module

I use setuptools for creating the module installation script.
In manual of the setuptools module is presented the example of the project directory structure. In this case an import of module useful_1 will be look like: from an_example_pypi_project import useful_1.
So directive packages in setup.py file must also include package an_example_pypi_project.
What if I want use the useful_1 module without any wrappers and import this module with simple instruction: import useful_1? How will look my setup.py file?

For example this is a source code of my setup.py file. How you can see, I want include only 'pyvalid.py' file and I expect for a next import structure: from pyvalid import accepts, returns, where accepts and returns are classes in module pyvalid. 
In directive packages of my setup script I put next value: ['.']. This solution can solve my problem, but just partially, because I had obtained new troubles.

On the installation I encounter with this warning: 
WARNING: '.' not a valid package name; please use only.-separated package names in setup.py
Installation script also include some unnecessary files:
/fakepath/site-packages/pyvalid-0.0.2-py3.4.egg-info
/fakepath/site-packages/pyvalid.py
/fakepath/site-packages/__init__.py -- unnecessary
/fakepath/site-packages/setup.py -- unnecessary
/fakepath/site-packages/test.py -- unnecessary

Question: how I can create setup.py script with one module? Thanks for help.

A:

I found the one solution of my problem. I can create package named "pyvalid" and in the file __init__.py define objects for an import.
In my case, directive packages in setup.py file must look like: packages=["pyvalid"].
This way will allow me to create installation script for project with following import structure: from pyvalid import some_object.

