summaryrefslogtreecommitdiff
blob: 6ca750e79193e79335e29b4a86527034052606a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
commit e42661b9cd6d7b71ce5e7674ac8eff25c74db07a
Author: yac <yac@blesmrt.net>
Date:   Wed May 8 05:00:32 2013 +0200

    use entry_point fixes #6

diff --git a/setup.py b/setup.py
index 9e00fba..512fa79 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
-from distutils.core import setup
+from setuptools import setup
 
 setup(
     name = 'svg2rlg',
@@ -12,6 +12,8 @@ setup(
     url = 'http://code.google.com/p/svg2rlg/',
     download_url = 'http://pypi.python.org/pypi/svg2rlg/',
     requires = ['reportlab'],
+    entry_points = {
+                'console_scripts': ['svg2rlg = svg2rlg:main']},
     
     classifiers=[
           'Environment :: Console',
@@ -30,4 +32,4 @@ The authors motivation was to have a more robust handling of
 SVG files in the **rst2pdf** tool. Specific to be able to handle
 the quirks needed to include SVG export from matplotlib.
 '''
-)
\ No newline at end of file
+)
diff --git a/svg2rlg.py b/svg2rlg.py
index 2b35c62..cc812b2 100644
--- a/svg2rlg.py
+++ b/svg2rlg.py
@@ -1562,7 +1562,7 @@ def svg2rlg(filename):
     
     return renderer.render(xml)
     
-if __name__ == "__main__":
+def main():
     import sys
     import os