Changeset 758


Ignore:
Timestamp:
Jan 15, 2016, 1:42:07 PM (3 years ago)
Author:
cito
Message:

Build source distribution with setup script

Instead of building the source distribution (the tarball) manually
in mktar, we now let setup.py do the work for us.

This has the advantage that we can be sure that the created tarball
conforms to the standards (e.g. contains the egg-info bits), and we
don't need to maintain the list of source files in two places any
more - we only need to maintain the MANIFEST.in file now.

Note that setup.py creates a tar.gz file instead of .tgz as before.
We should also distribute it like that because it's the standard on
PyPI etc. I have also changed the download docs to reflect this.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/docs/download/download.rst

    r695 r758  
    66
    77The **released version of the source code** is available at
    8   * http://pygresql.org/files/PyGreSQL.tgz
     8  * http://pygresql.org/files/PyGreSQL.tar.gz
    99You can also check the latest **pre-release version** at
    10   * http://pygresql.org/files/PyGreSQL-beta.tgz
     10  * http://pygresql.org/files/PyGreSQL-beta.tar.gz
    1111A **Linux RPM** can be picked up from
    1212  * http://pygresql.org/files/pygresql.i386.rpm
  • branches/4.x/mkdocs

    r755 r758  
    1616${MAKE} clean
    1717${MAKE} html
    18 rm -f build/html/.buildinfo
  • branches/4.x/mktar

    r755 r758  
    3434./mkdocs
    3535
    36 # The following does essentially the same as "python setup.py sdist".
     36# Package as source distribution.
    3737
    38 TD=PyGreSQL-$VERSION
    39 TF=$DISTDIR/$TD.tgz
     38rm -rf build dist
    4039
    41 MODFILES="pg.py pgdb.py pgmodule.c
    42           pgfs.h pgtypes.h
    43           setup.py setup.cfg
    44           LICENSE.txt README.rst MANIFEST.in"
    45 DOCFILES="docs/Makefile docs/make.bat docs/*.rst docs/*.py
    46           docs/contents docs/download docs/community
    47           docs/_static docs/_templates"
    48 HTMLFILES="docs/_build/html"
    49 TESTFILES="tests/*.py"
     40python setup.py sdist
    5041
    51 rm -rf $TD
    52 mkdir $TD
    53 mkdir -p $TD/docs/_build/html
    54 mkdir $TD/tests
    55 cp $MODFILES $TD
    56 cp -r $DOCFILES $TD/docs
    57 cp -r $HTMLFILES $TD/docs/_build
    58 cp $TESTFILES $TD/tests
    59 tar -cvzf $TF $TD
     42DF=`ls dist`
     43TF=$DISTDIR/$DF
     44
     45cp dist/$DF $TF
    6046chmod 644 $TF
    61 rm -rf $TD
     47
    6248rm -f $DISTDIR/$SYMLINK
    63 ln -s $TD.tgz $DISTDIR/$SYMLINK
     49ln -s $DF $DISTDIR/$SYMLINK
    6450
    65 echo "$TF has been built"
     51echo "$TF has been built."
  • trunk/docs/download/download.rst

    r710 r758  
    66
    77The **released version of the source code** is available at
    8   * http://pygresql.org/files/PyGreSQL.tgz
     8  * http://pygresql.org/files/PyGreSQL.tar.gz
    99You can also check the latest **pre-release version** at
    10   * http://pygresql.org/files/PyGreSQL-beta.tgz
     10  * http://pygresql.org/files/PyGreSQL-beta.tar.gz
    1111A **Linux RPM** can be picked up from
    1212  * http://pygresql.org/files/pygresql.i386.rpm
  • trunk/mkdocs

    r755 r758  
    1616${MAKE} clean
    1717${MAKE} html
    18 rm -f build/html/.buildinfo
  • trunk/mktar

    r756 r758  
    3434./mkdocs
    3535
    36 # The following does essentially the same as "python setup.py sdist".
     36# Package as source distribution.
    3737
    38 TD=PyGreSQL-$VERSION
    39 TF=$DISTDIR/$TD.tgz
     38rm -rf build dist
    4039
    41 MODFILES="pg.py pgdb.py pgmodule.c
    42           pgtypes.h py3c.h
    43           setup.py setup.cfg
    44           LICENSE.txt README.rst MANIFEST.in"
    45 DOCFILES="docs/Makefile docs/make.bat docs/*.rst docs/*.py
    46           docs/contents docs/download docs/community
    47           docs/_static docs/_templates"
    48 HTMLFILES="docs/_build/html"
    49 TESTFILES="tests/*.py"
     40python setup.py sdist
    5041
    51 rm -rf $TD
    52 mkdir $TD
    53 mkdir -p $TD/docs/_build/html
    54 mkdir $TD/tests
    55 cp $MODFILES $TD
    56 cp -r $DOCFILES $TD/docs
    57 cp -r $HTMLFILES $TD/docs/_build
    58 cp $TESTFILES $TD/tests
    59 tar -cvzf $TF $TD
     42DF=`ls dist`
     43TF=$DISTDIR/$DF
     44
     45cp dist/$DF $TF
    6046chmod 644 $TF
    61 rm -rf $TD
     47
    6248rm -f $DISTDIR/$SYMLINK
    63 ln -s $TD.tgz $DISTDIR/$SYMLINK
     49ln -s $DF $DISTDIR/$SYMLINK
    6450
    65 echo "$TF has been built"
     51echo "$TF has been built."
Note: See TracChangeset for help on using the changeset viewer.