Python/Distribution: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==setup.py==
==Build Script==
<code>setup.py</code>
<source lang="python">
<source lang="python">
#!/usr/bin/env python
#!/usr/bin/env python
Line 41: Line 42:
</source>
</source>


==setup.cfg==
==Build Config==
<code>setup.cfg</code>
<source lang="cfg">
<source lang="cfg">
[global]
[global]
Line 85: Line 87:
</source>
</source>


==Build==
==Build Command==
<source lang="bash">
<source lang="bash">
# build
# build

Revision as of 02:23, 5 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=

Build Command

# 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

References