Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 81 lines (70 sloc) 2.399 kb
f81e7fba »
2007-01-13 All classes from s3.py go to S3/S3.py
1 from distutils.core import setup
093be855 »
2007-06-16 2007-06-17 Michal Ludvig <michal@logix.cz>
2 import sys
ab58f171 »
2007-01-19 - Added configuration for setup.py sdist
3 import os
4
747ddb2a »
2007-03-26 2007-03-26 Michal Ludvig <michal@logix.cz>
5 import S3.PkgInfo
6
10465167 »
2007-07-20 2007-07-20 Michal Ludvig <michal@logix.cz>
7 if float("%d.%d" % sys.version_info[:2]) < 2.4:
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
8 sys.stderr.write("Your Python version %d.%d.%d is not supported.\n" % sys.version_info[:3])
9 sys.stderr.write("S3cmd requires Python 2.4 or newer.\n")
10 sys.exit(1)
10465167 »
2007-07-20 2007-07-20 Michal Ludvig <michal@logix.cz>
11
12 try:
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
13 import xml.etree.ElementTree as ET
14 print "Using xml.etree.ElementTree for XML processing"
10465167 »
2007-07-20 2007-07-20 Michal Ludvig <michal@logix.cz>
15 except ImportError, e:
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
16 sys.stderr.write(str(e) + "\n")
17 try:
18 import elementtree.ElementTree as ET
19 print "Using elementtree.ElementTree for XML processing"
20 except ImportError, e:
21 sys.stderr.write(str(e) + "\n")
22 sys.stderr.write("Please install ElementTree module from\n")
23 sys.stderr.write("http://effbot.org/zone/element-index.htm\n")
24 sys.exit(1)
10465167 »
2007-07-20 2007-07-20 Michal Ludvig <michal@logix.cz>
25
ab58f171 »
2007-01-19 - Added configuration for setup.py sdist
26 try:
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
27 ## Remove 'MANIFEST' file to force
28 ## distutils to recreate it.
29 ## Only in "sdist" stage. Otherwise
30 ## it makes life difficult to packagers.
31 if sys.argv[1] == "sdist":
32 os.unlink("MANIFEST")
ab58f171 »
2007-01-19 - Added configuration for setup.py sdist
33 except:
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
34 pass
ab58f171 »
2007-01-19 - Added configuration for setup.py sdist
35
593ef060 »
2010-11-12 * format-manpage.pl: new manpage auto-formatter
36 ## Re-create the manpage
37 ## (Beware! Perl script on the loose!!)
38 if sys.argv[1] == "sdist":
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
39 if os.stat_result(os.stat("s3cmd.1")).st_mtime < os.stat_result(os.stat("s3cmd")).st_mtime:
40 sys.stderr.write("Re-create man page first!\n")
41 sys.stderr.write("Run: ./s3cmd --help | ./format-manpage.pl > s3cmd.1\n")
42 sys.exit(1)
593ef060 »
2010-11-12 * format-manpage.pl: new manpage auto-formatter
43
c9930864 »
2007-06-19 2007-06-19 Michal Ludvig <michal@logix.cz>
44 ## Don't install manpages and docs when $S3CMD_PACKAGING is set
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
45 ## This was a requirement of Debian package maintainer.
c9930864 »
2007-06-19 2007-06-19 Michal Ludvig <michal@logix.cz>
46 if not os.getenv("S3CMD_PACKAGING"):
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
47 man_path = os.getenv("S3CMD_INSTPATH_MAN") or "share/man"
48 doc_path = os.getenv("S3CMD_INSTPATH_DOC") or "share/doc/packages"
49 data_files = [
50 (doc_path+"/s3cmd", [ "README", "INSTALL", "NEWS" ]),
51 (man_path+"/man1", [ "s3cmd.1" ] ),
52 ]
c9930864 »
2007-06-19 2007-06-19 Michal Ludvig <michal@logix.cz>
53 else:
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
54 data_files = None
09b29caf »
2007-04-08 2007-04-09 Michal Ludvig <michal@logix.cz>
55
56 ## Main distutils info
747ddb2a »
2007-03-26 2007-03-26 Michal Ludvig <michal@logix.cz>
57 setup(
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
58 ## Content description
59 name = S3.PkgInfo.package,
60 version = S3.PkgInfo.version,
61 packages = [ 'S3' ],
62 scripts = ['s3cmd'],
63 data_files = data_files,
7023e931 »
2007-01-19 Added info for building RPM packages.
64
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
65 ## Packaging details
66 author = "Michal Ludvig",
67 author_email = "michal@logix.cz",
68 url = S3.PkgInfo.url,
69 license = S3.PkgInfo.license,
70 description = S3.PkgInfo.short_description,
71 long_description = """
747ddb2a »
2007-03-26 2007-03-26 Michal Ludvig <michal@logix.cz>
72 %s
7023e931 »
2007-01-19 Added info for building RPM packages.
73
74 Authors:
75 --------
747ddb2a »
2007-03-26 2007-03-26 Michal Ludvig <michal@logix.cz>
76 Michal Ludvig <michal@logix.cz>
77 """ % (S3.PkgInfo.long_description)
d439efb4 »
2011-06-08 ATTENTION -- Mega WhiteSpace conversion !!!
78 )
79
80 # vim:et:ts=4:sts=4:ai
Something went wrong with that request. Please try again.