Python egg package Similar to jar, all in zip-based,. Egg-Terminated files

Source: Internet
Author: User

Python egg packages are similar to jars, all of which are zip-based,. Egg-terminated files, as bundles for distributing code.

A "Python egg" is a logical structure of a Python project, consisting of code, resources, and metadata.

The key principles of egg are discoverable (discoverable), callable (importable). That is, Python applications (application) can easily and efficiently find what eggs is on a system and ensure that the eggs content that is needed is callable.

The. Egg format is ideal for publishing and easy to uninstall or update because the project needs to be contained within a single directory or a file, and no other project or resource code is mixed. This way he can also make sure that a project can have multiple versions installed at the same time, so a program can choose the version they want.

Complete cross-platform as a pure Python,.egg file.

installation of the. Egg file: Using Easy_install *.egg;

Egg Pack Uninstall:

Vim $python _path/lib/site-packages/easy-install.pth

Delete to the line where the egg package name is located,

: Wq

Restart the Python environment.

Egg package Making: If you create an egg package for a path such as MyMath, there may be a lot of Python scripts in this area.

1.

# setup.pyfrom Setuptools Import Setup, Find_packagessetup (    name = "MyMath",    Version = "0.1",    packages = Find _packages ()    )

2. Then

At this point it produces a lot of output, after the end, you can see that there are three file directories: Build,dist,mymath.egg-info. We are concerned with the Dist directory, which is the path to the. egg file with the default Python version.

More details. Egg Production Reference: https://www.cnblogs.com/kungfupanda/p/3343113.html

setup.py Reference: http://python.jobbole.com/87240/

Python egg package Similar to jar, all in zip-based,. Egg-Terminated files

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.