ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

Clean up setup.py-related files and folders #465

Open sf-issues opened 12 years ago

sf-issues commented 12 years ago

Converted from SourceForge issue 3420579, submitted by ceball Submit Date: 2011-10-08 13:18 GMT

Need to clean up (simplify/reorganize/remove) setup.py-related files and folders (e.g. debian/, os/, create_topographica_script.py, windows_postinstall.py, README.setup.txt, MANIFEST.in).

sf-issues commented 12 years ago

Submitted by ceball Date: 2011-10-08 14:01 GMT

Those files in more detail:

* Makefile: controls building of setup.py-based distributions (.tar.gz for python setup.py install/easy_install/pip install + deb files + rpm files + .exe for Windows double click install to existing environment + .mpkg for Mac install to existing environment).

* create_topographica_script.py: used by Makefile and setup.py to create "topographica" script. Needs renaming or merging.

* windows_postinstall.py: desktop shortcuts, registry associations, double clickable topographica icon etc

* README.setup.txt: The Makefile replaces README.txt with README.setup.txt when the "python setup.py" distribution is created (i.e. we don't actually want people to read this file as it is!).

* MANIFEST.in: apparently required for setup.py, even though it repeats what's in setup.py?

* osx/: Bilal's improved Mac distribution solution

* debian/: deb creation stuff

* topographica.ico: Windows-specific icon?

Need to move platform-specific files and folders into e.g. platforms/ or platform/ or dist/ or packages/ or packaging/ or os/ (pick one). There'll probably be sub-folders for Debian (debian/? deb/?), RPM (rpm/?), Mac OS X (mac/? osx?), and Windows (win/?). And maybe a distutils/ folder for the general setup.py stuff? Also maybe a src/ subfolder that contains create_topographica_script.py (if it's necessary to keep that script) and anything else needed for building the fat distribution. Not sure.

sf-issues commented 12 years ago

Submitted by jbednar Date: 2011-11-14 11:01 GMT

My preference:

platform/osx
platform/debian platform/windows (topographic.ico, windows_postinstall.py) platform/distutils (README.setup.txt, MANIFEST.in) etc/create_topographica_script.py etc/pyflakes-ignore.py

Not sure if setup.py should move to platform/distutils; it might need to stay where it is. I don't see any RPM-specific files, but if there are any, they should probably be in platform/rpm.

Jim

sf-issues commented 12 years ago

Submitted by ceball Date: 2011-11-14 11:23 GMT

I think setup.py shouldn't be at the top level, but should be in platform/distutils/.

setup.py of course needs to be in the top-level directory for any setup.py-based distribution we make. We make such distributions using the Makefile (e.g make dist-setup.py). Currently, the Makefile copies setup.py into wherever it's creating a setup.py-based distribution, so it could just as easily copy it from somewhere else.

Unless we want people with the fat distribution (i.e. mainly developers) to start using setup.py instead of the Makefile? I'm certain we don't (although my knowledge may be out of date - it's from the time of python 2.6). While setuptools adds some commands to support this kind of thing, it was a mess last time I checked.

sf-issues commented 12 years ago

Submitted by jbednar Date: 2011-11-14 11:47 GMT

Ok; agreed; setup.py should move to platform/distutils. So I think the complete plan is clear now.

I think building the fat distribution using setup.py instead of the Makefile is much too ambitious for this release.