Projet

Général

Profil

« Précédent | Suivant » 

Révision 5ba9c64e

Ajouté par Jérôme Schneider il y a presque 11 ans

setup.py: remove Django dependency

Voir les différences:

setup.py
3 3
''' Setup script for python-entrouvert
4 4
'''
5 5

  
6
import sys
7

  
6 8
from setuptools import setup, find_packages
7 9
from setuptools.command.install_lib import install_lib as _install_lib
8 10
from distutils.command.build import build as _build
......
22 24
    def run(self):
23 25
        import os
24 26
        import sys
25
        from django.core.management.commands.compilemessages import \
26
            compile_messages
27
        for path in ['entrouvert/djommon/']:
28
            if path.endswith('.py'):
29
                continue
30
            curdir = os.getcwd()
31
            os.chdir(os.path.realpath(path))
32
            compile_messages(stderr=sys.stderr)
33
            os.chdir(curdir)
27
        try:
28
            from django.core.management.commands.compilemessages import \
29
                    compile_messages
30
            for path in ['entrouvert/djommon/']:
31
                if path.endswith('.py'):
32
                    continue
33
                curdir = os.getcwd()
34
                os.chdir(os.path.realpath(path))
35
                compile_messages(stderr=sys.stderr)
36
                os.chdir(curdir)
37
        except ImportError:
38
            print
39
            sys.stderr.write('!!! Please install Django >= 1.4 to build translations')
40
            print
41
            print
34 42

  
35 43
class build(_build):
36 44
    sub_commands = [('compile_translations', None)] + _build.sub_commands
......
84 92
      packages=find_packages(),
85 93
      scripts=('tools/check-git2python-packaging.sh',),
86 94
      install_requires=[],
87
      setup_requires=[
88
          'django>=1.4',
89
      ],
90 95
      tests_require=[
91 96
          'nose>=0.11.4',
92 97
      ],

Formats disponibles : Unified diff