[mat-dev] Declare deps in MAT setup.py file

Nachricht löschen

Nachricht beantworten
Autor: Georges Bossert
Datum:  
To: julien.voisin
CC: mat-dev
Betreff: [mat-dev] Declare deps in MAT setup.py file
Hello,

You'll find attached two small patches over origin/master of MAT.
Please review before applying them (or not) :).

Yours,

Georges

> commit 114ea94c3257d5eff4cb5b3d1c7de58c5cfbb152
> Author: Georges Bossert <georges.bossert@???>
> Date: Tue Jul 16 14:19:02 2013 +0200
>
>     Add hachoir-core, hachoir-parser and pdfrw as dependencies in setup.py

>
>     With this modification the install command
>     $python setup.py install
>     downloads from the python central repository (Pypi) and install
> the three specified deps.

>
> commit 928a8f70279411ec6a8e77cf798456f69efe559d
> Author: Georges Bossert <georges.bossert@???>
> Date: Tue Jul 16 14:16:08 2013 +0200
>
>     Use setuptools instead of distutils in setup.py.

>
>     Setuptools introduces the setup option 'install_requires' that
>     allows to specify the manadatory dependencies of the project.


>From 928a8f70279411ec6a8e77cf798456f69efe559d Mon Sep 17 00:00:00 2001
From: Georges Bossert <georges.bossert@???>
Date: Tue, 16 Jul 2013 14:16:08 +0200
Subject: [PATCH 1/2] Use setuptools instead of distutils in setup.py.

Setuptools introduces the setup option 'install_requires' that
allows to specify the manadatory dependencies of the project.
---
 setup.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


diff --git a/setup.py b/setup.py
index 439c99c..0775f22 100755
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,9 @@

import os

-from distutils.core import setup
+#Relies on setuptools to include deps management
+#instead of distutils setup (from distutils.core import setup)
+from setuptools import setup
from DistUtilsExtra.command import *

__version__ = '0.4'
--
1.7.10.4

>From 114ea94c3257d5eff4cb5b3d1c7de58c5cfbb152 Mon Sep 17 00:00:00 2001
From: Georges Bossert <georges.bossert@???>
Date: Tue, 16 Jul 2013 14:19:02 +0200
Subject: [PATCH 2/2] Add hachoir-core, hachoir-parser and pdfrw as
dependencies in setup.py

With this modification the install command
$python setup.py install
downloads from the python central repository (Pypi) and install the three specified deps.
---
 setup.py |    9 +++++++++
 1 file changed, 9 insertions(+)


diff --git a/setup.py b/setup.py
index 0775f22..e384de0 100755
--- a/setup.py
+++ b/setup.py
@@ -15,6 +15,14 @@ __version__ = '0.4'
 if os.path.exists('MANIFEST'):
     os.remove('MANIFEST')


+#Definition of the minimal dependencies
+#required for the execution of MAT
+dependencies =  [
+    'hachoir-core >= 1.3.3',
+    'hachoir-parser >= 1.3.3',
+    'pdfrw'
+]
+
 setup(
     name              = 'MAT',
     version           = __version__,
@@ -25,6 +33,7 @@ setup(
     platforms         = 'linux',
     license           = 'GPLv2',
     url               = 'https://mat.boum.org',
+    install_requires  = dependencies,
     packages          = ['MAT', 'MAT.hachoir_editor', 'MAT.bencode'],
     scripts           = ['mat', 'mat-gui'],
     data_files        = [
-- 
1.7.10.4