Python/Distribution: Difference between revisions
Jump to navigation
Jump to search
(Created page with "* [https://docs.python.org/3.6/distutils/index.html Distributing Python Modules (Legacy version)] * [https://docs.python.org/3/distutils/packageindex.html The Python Package I...") |
|||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Build Script== | |||
<code>setup.py</code> | |||
<source lang="python"> | |||
#!/usr/bin/env python | |||
from distutils.core import setup | |||
setup( | |||
name='launch', | |||
version='1.0.00.GA', | |||
maintainer='Chorke, Inc.', | |||
author='Chorke Academia, Inc.', | |||
author_email='[email protected]', | |||
maintainer_email='[email protected]', | |||
license='Python Software Foundation License (PSFL)', | |||
description='Enterprise Business Intelligence Suite', | |||
url='http://cdn.chorke.org/docs/academia/chorke-init-launch', | |||
# packages=['distutils', 'distutils.command'], | |||
package_dir= { | |||
'': 'lib' | |||
}, | |||
requires={ | |||
}, | |||
classifiers=[ | |||
'Environment :: Console', | |||
'Topic :: Office/Business', | |||
'Operating System :: POSIX', | |||
'Development Status :: 3.0.00', | |||
'Environment :: Web Environment', | |||
'Programming Language :: Python', | |||
'Intended Audience :: Developers', | |||
'Topic :: Communications :: Email', | |||
'Operating System :: MacOS :: MacOS X', | |||
'Intended Audience :: End Users/Desktop', | |||
'Operating System :: Microsoft :: Windows', | |||
'Intended Audience :: System Administrators', | |||
'Topic :: Software Development :: Bug Tracking', | |||
'License :: OSI Approved :: Python Software Foundation License', | |||
], | |||
) | |||
</source> | |||
==Build Config== | |||
<code>setup.cfg</code> | |||
<source lang="cfg"> | |||
[global] | |||
verbose=0 | |||
[build] | |||
build_base=./../../../target/distutils/build | |||
[build_ext] | |||
inplace=1 | |||
[install] | |||
prefix=$HOME | |||
#install_base=$HOME/python | |||
install_platlib=lib.$PLAT | |||
install_scripts=scripts | |||
install_purelib=lib | |||
install_data=data | |||
[bdist] | |||
dist_dir=./../../../target/distutils/dist | |||
formats=gztar,bztar,xztar | |||
[bdist_msi] | |||
#target_version=3.6 | |||
dist_dir=./../../../target/distutils/dist | |||
#packager=Chorke Academia, Inc<[email protected]> | |||
#pre_install_script= | |||
#install_script= | |||
[bdist_rpm] | |||
release=1.0.00.GA | |||
#packager=Chorke Academia, Inc<[email protected]> | |||
[bdist_wininst] | |||
#target_version=3.6 | |||
title=EBIS Engine Installation | |||
bitmap=./../resources/launch.bmp | |||
dist_dir=./../../../target/distutils/dist | |||
#packager=Chorke Academia, Inc<[email protected]> | |||
#pre_install_script= | |||
#install_script= | |||
</source> | |||
==How to Build== | |||
<source lang="bash"> | |||
# build | |||
rm -rf ./target;\ | |||
cd ./src/main/python;python setup.py bdist;\ | |||
cd ./../../../;du -h ./target/distutils/dist/*.tar.* | |||
# msi build | |||
rm -rf ./target;\ | |||
cd ./src/main/python;python setup.py bdist_msi;\ | |||
cd ./../../../;du -h ./target/distutils/dist/*.msi | |||
# wininst build | |||
rm -rf ./target;\ | |||
cd ./src/main/python;python setup.py bdist_wininst;\ | |||
cd ./../../../;du -h ./target/distutils/dist/*.exe | |||
</source> | |||
==References== | |||
* [https://docs.python.org/3.6/distutils/index.html Distributing Python Modules (Legacy version)] | * [https://docs.python.org/3.6/distutils/index.html Distributing Python Modules (Legacy version)] | ||
* [https://stackoverflow.com/questions/2933 Create an executable cross-platform GUI] | |||
* [https://docs.python.org/3/distutils/packageindex.html The Python Package Index (PyPI)] | * [https://docs.python.org/3/distutils/packageindex.html The Python Package Index (PyPI)] | ||
* [https://docs.python.org/3.6/distutils/setupscript.html Python Writing the Setup Script] | * [https://docs.python.org/3.6/distutils/setupscript.html Python Writing the Setup Script] | ||
* [https://docs.python.org/3/distutils/sourcedist.html Creating a Source Distribution] | * [https://docs.python.org/3/distutils/sourcedist.html Creating a Source Distribution] | ||
* [https://docs.python.org/3/distutils/builtdist.html Creating Built Distributions] | * [https://docs.python.org/3/distutils/builtdist.html Creating Built Distributions] |
Latest revision as of 01:20, 19 February 2019
Build Script
setup.py
#!/usr/bin/env python
from distutils.core import setup
setup(
name='launch',
version='1.0.00.GA',
maintainer='Chorke, Inc.',
author='Chorke Academia, Inc.',
author_email='[email protected]',
maintainer_email='[email protected]',
license='Python Software Foundation License (PSFL)',
description='Enterprise Business Intelligence Suite',
url='http://cdn.chorke.org/docs/academia/chorke-init-launch',
# packages=['distutils', 'distutils.command'],
package_dir= {
'': 'lib'
},
requires={
},
classifiers=[
'Environment :: Console',
'Topic :: Office/Business',
'Operating System :: POSIX',
'Development Status :: 3.0.00',
'Environment :: Web Environment',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Topic :: Communications :: Email',
'Operating System :: MacOS :: MacOS X',
'Intended Audience :: End Users/Desktop',
'Operating System :: Microsoft :: Windows',
'Intended Audience :: System Administrators',
'Topic :: Software Development :: Bug Tracking',
'License :: OSI Approved :: Python Software Foundation License',
],
)
Build Config
setup.cfg
[global]
verbose=0
[build]
build_base=./../../../target/distutils/build
[build_ext]
inplace=1
[install]
prefix=$HOME
#install_base=$HOME/python
install_platlib=lib.$PLAT
install_scripts=scripts
install_purelib=lib
install_data=data
[bdist]
dist_dir=./../../../target/distutils/dist
formats=gztar,bztar,xztar
[bdist_msi]
#target_version=3.6
dist_dir=./../../../target/distutils/dist
#packager=Chorke Academia, Inc<[email protected]>
#pre_install_script=
#install_script=
[bdist_rpm]
release=1.0.00.GA
#packager=Chorke Academia, Inc<[email protected]>
[bdist_wininst]
#target_version=3.6
title=EBIS Engine Installation
bitmap=./../resources/launch.bmp
dist_dir=./../../../target/distutils/dist
#packager=Chorke Academia, Inc<[email protected]>
#pre_install_script=
#install_script=
How to Build
# build
rm -rf ./target;\
cd ./src/main/python;python setup.py bdist;\
cd ./../../../;du -h ./target/distutils/dist/*.tar.*
# msi build
rm -rf ./target;\
cd ./src/main/python;python setup.py bdist_msi;\
cd ./../../../;du -h ./target/distutils/dist/*.msi
# wininst build
rm -rf ./target;\
cd ./src/main/python;python setup.py bdist_wininst;\
cd ./../../../;du -h ./target/distutils/dist/*.exe