See an article Good:
Http://harttle.com/2015/05/29/pkg-manager.html
Package management and building systems are essential tools in modern software development teams and are common organizational methods for Linux software systems. Modern programming languages mostly give their own special package management and build system, then this article will summarize the small series used in the package management and build system.
Javascript
Server-side Javascript typically uses NPM as a dependency management tool.
- Rely on the commands provided by NPM
npm
to download, upgrade, and remove dependencies.
- By
package.json
defining the meta-information of the package, developing dependencies (development or testing needs), deployment dependencies (runtime requirements).
- Dependencies are stored recursively in
node_modules
.
- Dependencies are isolated between projects, and global installation (
-g
) makes it a command-line tool rather than a global dependency. > Recursive dependency on the download style makes NPM's cache and its importance. The cache is located ~/.npm
below, where the package file is saved in this .tgz
format.
JavaScript is typically built using Grunt.
- Grunt completes the task via plugins, each of which is equivalent to a makefile command.
- The grunt task is defined in
Gruntfile.js
.
- NPM offers a wide range of grunt plugins, and of course you can also hand-write.
- The grunt task inherits the asynchronous nature of JavaScript.
Front-end Lib
Front-end Lib can be downloaded via Bower. Bower can download not only the registered software package, but also the GitHub Repo, even the URL of a file.
bower
dependency Management through commands.
bower.json
Defines the meta-information and dependencies of the package.
- The path where the dependency is located can be
bower.json
set in.
- Bower is just a command-line tool that you need to execute the Bower command on the correct path.
Bower has the flexibility to download dependencies, but its drawbacks are obvious: unregistered packages tend to contain redundant, non-production-environment code, sometimes even manually.
Java
MAVEN is a project management tool based on the Project object Model (POM) that describes the project's version, URL, License, dependencies, and other information through a text file.
pom.xml
to describe the MAVEN project.
- MAVEN is a project management tool that includes the ability to manage dependencies and build software.
- Maven
.properties
reads system features through file and command-line arguments.
Ant is a command-line tool written in Java that compiles, tests, and deploys Java applications.
build.xml
to describe the build process.
build.xml
The logic is similar to makefile, with each target consisting of commands and parameters.
- The system attributes are read by command-line arguments.
Gradle is a project automation building tool based on the Apache Ant and Apache maven concepts. It uses a particular domain-specific language based on groovy to declare project settings, rather than traditional XML.
Python
Python's package management tool can tell a whole day's story: Distribute, Setuptools, Distutils, Easy_install, Pip, distutils2, packaging, eggs, wheels, pyvenv, Virtualenv ...
That's why I hate installing Python software, while older versions of Python2 are more popular than new Python3 and both are incompatible and often cause problems with Linux package management.
Now start telling the story:
- Distutils is the standard library for Python;
- Setuptools attempt to complete the distutils lack of features and began to develop;
- Easy_install is the command line interface of Setuptools, there are more features;
- During the development of the Setuptools, there was a divergence, and distribute, which was forked from Setuptools, was reconciled in 2013 and re-merge to Setuptools version 0.7;
- Compared to the above tools, Pip is a higher-order interface, Pip becomes the de facto Python software installation tool;
- Eggs and wheels become the de facto installation tool for binary Python software.
venv
And virtualenv
is used to create a Python virtual environment for application isolation.
- Venv is introduced in python3.3 to create a lightweight virtual environment in its own directory, or to isolate itself from the system environment.
- Virtualenv is a Python package that is used to create an orphaned python environment.
Ruby
Ruby's package unit is Rubygem.
- The gem is described by a
.gemspec
file.
- The gem's build process is
Rakefile
described by.
- Rake is the gem's build tool, which is similar to make for automated testing and code generation.
- Bundles are Ruby's package management tools used to track and download the correct version of the gem.
PHP seems to be composor, but it doesn't seem to use much. Is it because PHP is a copy? What you see is what you gain. C + + seems to have a CPM, but basically no one uses it. Other: Mac with Brew, Ubuntu with Apt-get,centos Yum
[Todo] Various language pack management tools