python - What's the point of using Distutils for pure modules? -


I recently downloaded the python class of Cltura for my API and it came with a standard distortion setup script. This source also comes with a Python script that includes various modules. I used Distilts setup script with the installed command, and the provided test code works, but I can not load the customer properly and work in other references.

Where I am confused about Distrasts fits in here. I already have modules, they were part of the collection I downloaded. Do I Need To Set Up Distinct Setup / Install? Can not I just import the module directly? What does it mean to install?

It is not sure that it helps, but here is the setup script:

  distutils.core import setup setup (name = 'KalturaClient', version = '1.0 .0 ', URL =' http: //www.kaltura.com/api_v3/testme/client-libs.php ', packages = [' CaltraCallant ',' Kultura Client.Plugin '], License =' AGPLL ', details = 'A Python module for accessing the Kultura API.', Long_directory = open ('README.txt'). Read (),)  

I distutils setup.py Right I see as a facilitator to move the directory.

The installed command transfers all modules to a user-wide (or system-wide, if run as root) accessible and known location, such as import If you do not care about the actual path, it is not absolutely necessary for modules simple setups. But if your setup becomes more complex then it would be nice. Some examples:

  • You have some modules that you use regularly in more than one place. Without setup, you have to project them all specific or universally accessible directories

  • You have different versions of modules for different projects. You create a virtualization and you can install it in the Virtualen by using setup.py .

While doing so by hand it is an error prone job where you have to remember all the paths correctly and accurately. This is not a problem with distances.

Definitely it is not a real big deal to do with hand-to-python modules. It definitely changes for more complex modules, which are connected to C code etc.

If you are familiar with Linux distributions, you can see it similar to the package-measurement tool of your distribution (DPKG, RPM). , e.t.c.).

Additionally setup.py is used by the PP and module repositories to download and install pan and paddington packages automatically.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -