Browse code

2007-06-17 Michal Ludvig <michal@logix.cz>

* setup.py: Cleaned up some rpm-specific stuff that
caused problems to Debian packager Mikhail Gusarov
* setup.cfg: Removed [bdist_rpm] section
* MANIFEST.in: Include S3/*.py



git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@123 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2007/06/16 22:07:56
Showing 4 changed files
... ...
@@ -1,3 +1,10 @@
1
+2007-06-17  Michal Ludvig  <michal@logix.cz>
2
+
3
+	* setup.py: Cleaned up some rpm-specific stuff that 
4
+	  caused problems to Debian packager Mikhail Gusarov
5
+	* setup.cfg: Removed [bdist_rpm] section
6
+	* MANIFEST.in: Include S3/*.py
7
+
1 8
 2007-06-16  Michal Ludvig  <michal@logix.cz>
2 9
 
3 10
 	* s3cmd.1: Syntax fixes from Mikhail Gusarov <dottedmag@dottedmag.net>
... ...
@@ -1,2 +1,3 @@
1 1
 include INSTALL README NEWS
2 2
 include s3cmd.1.gz
3
+include S3/*.py
... ...
@@ -3,8 +3,3 @@ formats = gztar,zip
3 3
 
4 4
 [install]
5 5
 prefix = /usr
6
-
7
-[bdist_rpm]
8
-requires = python = 2.5
9
-group = Productivity/Archiving
10
-doc-files = README, INSTALL, NEWS
... ...
@@ -1,18 +1,21 @@
1 1
 from distutils.core import setup
2
+import sys
2 3
 import os
3 4
 
4 5
 import S3.PkgInfo
5 6
 
6
-## Remove 'MANIFEST' file to force
7
-## distutils to recreate it
8 7
 try:
9
-	os.unlink("MANIFEST")
8
+	## Remove 'MANIFEST' file to force
9
+	## distutils to recreate it.
10
+	## Only in "sdist" stage. Otherwise 
11
+	## it makes life difficult to packagers.
12
+	if sys.argv[1] == "sdist":
13
+		os.unlink("MANIFEST")
10 14
 except:
11 15
 	pass
12 16
 
13
-## Compress manpage. It behaves weird 
14
-## with bdist_rpm when not compressed.
15
-os.system("gzip -c s3cmd.1 > s3cmd.1.gz")
17
+man_path = os.getenv("S3CMD_INSTPATH_MAN") or "share/man"
18
+doc_path = os.getenv("S3CMD_INSTPATH_DOC") or "share/doc/packages"
16 19
 
17 20
 ## Main distutils info
18 21
 setup(
... ...
@@ -22,8 +25,8 @@ setup(
22 22
 	packages = [ 'S3' ],
23 23
 	scripts = ['s3cmd'],
24 24
 	data_files = [
25
-		("share/doc/packages/s3cmd", [ "README", "INSTALL", "NEWS" ]),
26
-		("share/man/man1", [ "s3cmd.1.gz" ] ),
25
+		(doc_path+"/s3cmd", [ "README", "INSTALL", "NEWS" ]),
26
+		(man_path+"/man1", [ "s3cmd.1" ] ),
27 27
 	],
28 28
 
29 29
 	## Packaging details