Using a ChangeLog as a canonical source of package metadata

Steven D'Aprano steve at pearwood.info
Mon Jan 12 06:44:19 CET 2015


On Sun, 11 Jan 2015 12:37:03 -0800, wxjmfauth wrote:

> 1) I downloaded pyprimes-0.2.1a.tar.gz 
> 2) I extracted the relevant part,
> the py files, the pyprimes subdirectory,
> awful.py, compat23.py, factors.py, test.py, .......... and put in
> d:\junk

That is not the way packages work.

pyprimes is a package, which means it has to stay together in a single 
directory called "pyprimes", with a file called "__init__.py" inside it. 
It is not a set of independent modules.

Please read the README file, it explains the correct way to install 
pyprimes. You should use the setup.py installer script.

If you insist on manually doing this, you can copy the *entire* pyprimes 
package directory. That is, unpack the tar.gz file to something like this:


pyprimes/
+-- CHANGES.txt  
+-- LICENCE.txt
+-- MANIFEST  
+-- README.txt
+-- setup.py
+-- src/
    +-- pyprimes/
        +-- __init__.py
        +-- awful.py
        +-- factors.py
        +-- test.py
        etc.


Copy the *entire* folder pyprimes/src/pyprimes/ and move that somewhere 
into your PYTHONPATH. 

Or instead you can:

cd pyprimes/src  # ***NOT*** pyprimes/src/pyprimes !!!


and run python from there.


-- 
Steve



More information about the Python-list mailing list