Skip to content

Commit

Permalink
2007-06-19 Michal Ludvig <[email protected]>
Browse files Browse the repository at this point in the history
	* setup.py: Check for S3CMD_PACKAGING and don't install
	  manpages and docs if defined.
	* INSTALL: Document the above change.



git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@126 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information
mludvig committed Jun 19, 2007
1 parent 49731b4 commit c993086
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2007-06-19 Michal Ludvig <[email protected]>

* setup.py: Check for S3CMD_PACKAGING and don't install
manpages and docs if defined.
* INSTALL: Document the above change.

2007-06-17 Michal Ludvig <[email protected]>

* s3cmd: Added encryption key support to --configure
Expand Down
13 changes: 13 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@ There are three options to run s3cmd from source tarball:
find out the actual package name and how to install it then.


Note to distibutions package maintainers
----------------------------------------
Define shell environment variable S3CMD_PACKAGING=yes if you
don't want setup.py to install manpages and doc files. You'll
have to install them manually in your .spec or similar package
build scripts.

On the other hand if you want setup.py to install manpages
and docs, but to other than default path, define env
variables $S3CMD_INSTPATH_MAN and $S3CMD_INSTPATH_DOC. Check
out setup.py for details and default values.


Where to get help
-----------------
If in doubt, or if something doesn't work as expected,
Expand Down
18 changes: 12 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@
except:
pass

man_path = os.getenv("S3CMD_INSTPATH_MAN") or "share/man"
doc_path = os.getenv("S3CMD_INSTPATH_DOC") or "share/doc/packages"
## Don't install manpages and docs when $S3CMD_PACKAGING is set
## This was a requirement of Debian package maintainer.
if not os.getenv("S3CMD_PACKAGING"):
man_path = os.getenv("S3CMD_INSTPATH_MAN") or "share/man"
doc_path = os.getenv("S3CMD_INSTPATH_DOC") or "share/doc/packages"
data_files = [
(doc_path+"/s3cmd", [ "README", "INSTALL", "NEWS" ]),
(man_path+"/man1", [ "s3cmd.1" ] ),
]
else:
data_files = None

## Main distutils info
setup(
Expand All @@ -24,10 +33,7 @@
version = S3.PkgInfo.version,
packages = [ 'S3' ],
scripts = ['s3cmd'],
data_files = [
(doc_path+"/s3cmd", [ "README", "INSTALL", "NEWS" ]),
(man_path+"/man1", [ "s3cmd.1" ] ),
],
data_files = data_files,

## Packaging details
author = "Michal Ludvig",
Expand Down

0 comments on commit c993086

Please sign in to comment.