Giter Club home page Giter Club logo

sync-dist's Introduction

sync-dist

what's sync-dist

sync-dist copys all files belong to a python distribution installed in host into a directory. It's useful, if you want to pack a python distribution and deploy it to another enviroment.

how to use

A distribution consists of purelib, platlib, headers, scripts and data. If you want sync-dist to collect all distribuiton files, you MUST create a metadata file [dist-name]-[dist-version] in sync_dist/meta for the specified distribution. The following is the metadata file for pip-1.3.1:

dist_name = 'pip'
dist_version = '1.3.1'
purelib = ['pip']
scripts = ['pip', 'pip-python', 'python-pip']
data = ['/usr/share/doc/python-pip-1.3.1']

NOTE: If you want to include python modules in purelib, please make sure that the suffix of their names is .py.

After this, you can call sync_dist function in a python file. By default, this function search distribution files with the following variables. If the specified distribute has different configurations as the default ones, please provide them to this functions.

root        = '/'
home        = '~'
prefix      = sys.prefix
exec_prefix = sys.prefix
py_version  = sys.version.split()[0]

What a pity! If the distribution was installed with customized paths, sync-dist will need more help to work. You MUST provide these paths as the following names:

purelib_path
platlib_path
headers_path
scripts_path
data_path

license

author

Written by Myth

sync-dist's People

Contributors

mythzhu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.