Changeset 711


Ignore:
Timestamp:
Jan 11, 2016, 3:45:05 AM (3 years ago)
Author:
cito
Message:

Flatten the directory structure of the project

Simplified the directory structure by flattening the "module" subdirectory out
to the root directory. That way, the setup.py script can now also access the
top-level docs subdirectory, so it could also install or build the docs.
There was nothing else in the root directory anyway, except the mkdocs and
mktar scripts which could be made unnecessary through setup.py.

Also made the setup script a bit clearer. Removed the note about MinGW for
Windows since the Microsoft compiler for Python 2.7 and Visual Studio Community
are now freely available including 64bit compilers, and produce less problems.

Note that the usual structure would have been to use a "pygresql" package
directory instead of the "module" directory. But since we install PyGreSQL
as two top-level modules "pg" and "pgdb" instead of a package "pygresql",
the flattened structure reflects that much better. For historical reasons
and people don't want to rewrite import statements, we will keep it that way.

Files:
2 deleted
4 edited
27 copied

Legend:

Unmodified
Added
Removed
  • branches/4.x

    • Property svn:ignore
      •  

        old new  
         1*.egg-info
        12.idea
         3.tox
         4.vagrant
        25BETA
         6build
         7dist
  • branches/4.x/mktar

    r708 r711  
    3333TF=$DISTDIR/$TD.tgz
    3434
    35 MODFILES="module/pg.py module/pgdb.py module/pgmodule.c
    36           module/pgfs.h module/pgtypes.h
    37           module/setup.py module/setup.cfg"
     35MODFILES="pg.py pgdb.py pgmodule.c
     36          pgfs.h pgtypes.h
     37          setup.py setup.cfg"
    3838DOCFILES="docs/Makefile docs/make.bat docs/*.rst
    3939          docs/contents docs/download docs/community
    4040          docs/_static docs/_templates"
    4141HTMLFILES="docs/_build/html"
    42 TESTFILES="module/tests/*.py"
     42TESTFILES="tests/*.py"
    4343
    4444echo "Making source tarball..."
  • branches/4.x/setup.py

    r710 r711  
    1111* PyGreSQL written 1997 by D'Arcy J.M. Cain <darcy@druid.net>
    1212* based on code written 1995 by Pascal Andre <andre@chimay.via.ecp.fr>
    13 * setup script created 2000/04 Mark Alexander <mwa@gate.net>
    14 * tweaked 2000/05 Jeremy Hylton <jeremy@cnri.reston.va.us>
    15 * win32 support 2001/01 by Gerhard Haering <gerhard@bigfoot.de>
    16 * tweaked 2006/02-2010/02 by Christoph Zwerschke <cito@online.de>
     13* setup script created 2000 by Mark Alexander <mwa@gate.net>
     14* improved 2000 by Jeremy Hylton <jeremy@cnri.reston.va.us>
     15* improved 2001 by Gerhard Haering <gerhard@bigfoot.de>
     16* improved 2006 and 2016 by Christoph Zwerschke <cito@online.de>
    1717
    1818Prerequisites to be installed:
     
    2727python setup.py build   # to build the module
    2828python setup.py install # to install it
    29 
    30 You can use MinGW or MinGW-w64 for building on Windows:
    31 python setup.py build -c mingw32 install
    3229
    3330See docs.python.org/doc/install/ for more information on
     
    5956
    6057
     58# For historical reasons, PyGreSQL does not install itself as a single
     59# "pygresql" package, but as two top-level modules "pg", providing the
     60# classic interface, and "pgdb" for the modern DB-API 2.0 interface.
     61# These two top-level Python modules share the same C extension "_pg".
     62
     63py_modules = ['pg', 'pgdb']
     64c_sources = ['pgmodule.c']
     65
     66
    6167def pg_config(s):
    6268    """Retrieve information about installed version of PostgreSQL."""
     
    8187
    8288pg_version = pg_version()
    83 py_modules = ['pg', 'pgdb']
    8489libraries = ['pq']
    8590# Make sure that the Python header files are searched before
     
    177182    license="Python",
    178183    py_modules=py_modules,
    179     ext_modules=[Extension('_pg', ['pgmodule.c'],
     184    ext_modules=[Extension('_pg', c_sources,
    180185        include_dirs=include_dirs, library_dirs=library_dirs,
    181186        define_macros=define_macros, undef_macros=undef_macros,
  • trunk

    • Property svn:ignore
      •  

        old new  
         1*.egg-info
        12.idea
         3.tox
         4.vagrant
        25BETA
         6build
         7dist
  • trunk/mktar

    r710 r711  
    3333TF=$DISTDIR/$TD.tgz
    3434
    35 MODFILES="module/pg.py module/pgdb.py module/pgmodule.c
    36           module/pgfs.h module/pgtypes.h module/py3c.h
    37           module/setup.py module/setup.cfg"
     35MODFILES="pg.py pgdb.py pgmodule.c
     36          pgfs.h pgtypes.h py3c.h
     37          setup.py setup.cfg"
    3838DOCFILES="docs/Makefile docs/make.bat docs/*.rst
    3939          docs/contents docs/download docs/community
    4040          docs/_static docs/_templates"
    4141HTMLFILES="docs/_build/html"
    42 TESTFILES="module/tests/*.py"
     42TESTFILES="tests/*.py"
    4343
    4444echo "Making source tarball..."
  • trunk/setup.py

    r710 r711  
    1111* PyGreSQL written 1997 by D'Arcy J.M. Cain <darcy@druid.net>
    1212* based on code written 1995 by Pascal Andre <andre@chimay.via.ecp.fr>
    13 * setup script created 2000/04 Mark Alexander <mwa@gate.net>
    14 * tweaked 2000/05 Jeremy Hylton <jeremy@cnri.reston.va.us>
    15 * win32 support 2001/01 by Gerhard Haering <gerhard@bigfoot.de>
    16 * tweaked 2006/02-2010/02 by Christoph Zwerschke <cito@online.de>
     13* setup script created 2000 by Mark Alexander <mwa@gate.net>
     14* improved 2000 by Jeremy Hylton <jeremy@cnri.reston.va.us>
     15* improved 2001 by Gerhard Haering <gerhard@bigfoot.de>
     16* improved 2006 and 2016 by Christoph Zwerschke <cito@online.de>
    1717
    1818Prerequisites to be installed:
     
    2727python setup.py build   # to build the module
    2828python setup.py install # to install it
    29 
    30 You can use MinGW or MinGW-w64 for building on Windows:
    31 python setup.py build -c mingw32 install
    3229
    3330See docs.python.org/doc/install/ for more information on
     
    6057
    6158
     59# For historical reasons, PyGreSQL does not install itself as a single
     60# "pygresql" package, but as two top-level modules "pg", providing the
     61# classic interface, and "pgdb" for the modern DB-API 2.0 interface.
     62# These two top-level Python modules share the same C extension "_pg".
     63
     64py_modules = ['pg', 'pgdb']
     65c_sources = ['pgmodule.c']
     66
     67
    6268def pg_config(s):
    6369    """Retrieve information about installed version of PostgreSQL."""
     
    8288
    8389pg_version = pg_version()
    84 py_modules = ['pg', 'pgdb']
    8590libraries = ['pq']
    8691# Make sure that the Python header files are searched before
     
    178183    license="Python",
    179184    py_modules=py_modules,
    180     ext_modules=[Extension('_pg', ['pgmodule.c'],
     185    ext_modules=[Extension('_pg', c_sources,
    181186        include_dirs=include_dirs, library_dirs=library_dirs,
    182187        define_macros=define_macros, undef_macros=undef_macros,
Note: See TracChangeset for help on using the changeset viewer.