Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Introduction to distutils in python

top
|-- package
|   |-- __init__.py
|   |-- module.py
|   `-- things
|       |-- cross.png
|       |-- fplogo.png
|       `-- tick.png
|-- runner
|-- MANIFEST.in
|-- README
`-- setup.py
Comment

Introduction to distutils in python

##This will work in development on a relative folder basis
##It will then work when installed in site-packages on a target system
##where the runner script is in /usr/bin (or wherever)
##
##So, you don't need anything special - no fancy path tricks.

import package.module

package.module.start ()
Comment

Introduction to distutils in python

include runner README
recursive-include package/things *
Comment

Introduction to distutils in python

python setup.py sdist
Comment

Introduction to distutils in python

cd dist
tar xzf appname-100.tar.gz 
cd appname-100
sudo python setup.py install
password:######
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/bin/runner to 755
Comment

Introduction to distutils in python

distutils:$ runner
module is running
/usr/lib/python2.4/site-packages/package
My various data files and so on are:
['cross.png', 'fplogo.png', 'tick.png']
Comment

Introduction to distutils in python

classifiers=[
      'Development Status :: 4 - Beta',
      'Environment :: X11 Applications :: GTK',
      'Intended Audience :: End Users/Desktop',
      'Intended Audience :: Developers',
      'License :: OSI Approved :: GNU General Public License (GPL)',
      'Operating System :: POSIX :: Linux',
      'Programming Language :: Python',
      'Topic :: Desktop Environment',
      'Topic :: Text Processing :: Fonts'
      ]
Comment

Introduction to distutils in python

distutils:$ python setup.py sdist upload
Comment

Introduction to distutils in python

distutils:$ python setup.py sdist upload --sign
Comment

Introduction to distutils in python

include fontypython fp README COPYING
recursive-include fontypythonmodules/pofiles *
recursive-include fontypythonmodules/things *
recursive-include fontypythonmodules/locale *
recursive-include fontypythonmodules/help *
Comment

PREVIOUS NEXT
Code Example
Python :: custom-field-list_display 
Python :: list into string python 
Python :: django domain name 
Python :: duplicate a list with lowercase in python 
Python :: how to apply class method to pandas python 
Python :: inline for loop 
Python :: debugger online for python 
Python :: subplots whitespace 
Python :: Python multiline comment using docstrings 
Python :: python class to tuple 
Python :: funny application in python 
Python :: coin flip numpy 
Python :: running code once in a while loop python 
Python :: Regression model build 
Python :: Check for strings as positive/negative - integer/float 
Python :: how to change a particular text inside a list of dictionary 
Python :: odoo - add one2many field programmatically 
Python :: start a webservice quickly using python2.7 
Python :: pandas : stratification (mean) 
Python :: python .exe long start 
Python :: how to create a login page in python 
Python :: Summarizing Data and description data in pandas 
Python :: operation that returns True if all values are equal 
Python :: is assimilation part of digestive system 
Python :: python group groupe of 2 
Python :: Drawing rectangle with border only in matplotlib 
Python :: break outside loop python 
Python :: l1=[122, 5, 9, 4] l2=[991, 4, 8, 3] x=[l1[i]-l2[i] for i in range(abs(len(l1)), abs(len(l2)))] print (x) 
Python :: python cv2 blob detection seg fault 
Python :: python assertRaises with class property 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =