“Wprowadzenie do Distutils in Python” Kod odpowiedzi

Wprowadzenie do 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']
Shy Skunk

Wprowadzenie do Distutils in Python

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

Wprowadzenie do Distutils in Python

distutils:$ python setup.py sdist upload
Shy Skunk

Wprowadzenie do Distutils in Python

include runner README
recursive-include package/things *
Shy Skunk

Wprowadzenie do 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
Shy Skunk

Wprowadzenie do Distutils in Python

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

Wprowadzenie do 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'
      ]
Shy Skunk

Wprowadzenie do 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 ()
Shy Skunk

Wprowadzenie do Distutils in Python

python setup.py sdist
Shy Skunk

Wprowadzenie do Distutils in Python

distutils:$ python setup.py sdist upload --sign
Shy Skunk

Odpowiedzi podobne do “Wprowadzenie do Distutils in Python”

Pytania podobne do “Wprowadzenie do Distutils in Python”

Więcej pokrewnych odpowiedzi na “Wprowadzenie do Distutils in Python” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu