# HG changeset patch
# User Germán Póo-Caamaño <[email protected]>
# Date 1233953568 10800
# Node ID 1e8c48bd255412acd19358481ae9f8ded0188f7e
# Parent da8f7cab31ecf54c53c7ea5558a0f7c059f18f2a
setup: added a setup script to enable installation in Posix systems
diff --git a/setup-posix.py b/setup-posix.py
new file mode 100644
--- /dev/null
+++ b/setup-posix.py
@@ -0,0 +1,56 @@
+# setup-linux.py
+# A distutils setup script to install in Posix systems
+# (Unix-alike such as Linux, BSD, etc.)
+#
+
+import time
+import sys
+import os
+from distutils.core import setup
+
+_description = 'Graphical interface for Mercurial VCS'
+_scripts = []
+_packages = []
+_data_files = []
+extra = {}
+
+# Specific definitios for Posix installations
+_scripts = ['contrib/hgtk', 'hgproc.py']
+_packages = ['hggtk', 'hggtk.vis', 'hggtk.iniparse', 'tortoise']
+_data_files = [(os.path.join('share/pixmaps/tortoisehg', root),
+ [os.path.join(root, file_) for file_ in files])
+ for root, dirs, files in os.walk('icons')]
+_data_files += [('lib/nautilus/extensions-2.0/python',
+ ['contrib/nautilus-thg.py'])]
+
+# specify version string, otherwise 'hg identify' will be used:
+version = ''
+
+try:
+ l = os.popen('hg id -it').read().split()
+ while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags
+ l.pop()
+ version = l and l[-1] or 'unknown' # latest tag or revision number
+ if version.endswith('+'):
+ version += time.strftime('%Y%m%d')
+
+except OSError:
+ version = "unknown"
+
+f = file("tortoise/__version__.py", "w")
+f.write('# this file is autogenerated by setup.py\n')
+f.write('version = "%s"\n' % version)
+f.close()
+
+setup(name="TortoiseHg",
+ version=version,
+ author='TK Soh',
+ author_email='[email protected]',
+ url='http://tortoisehg.sourceforge.net/',
+ description=_description,
+ license='GNU GPL2',
+ scripts=_scripts,
+ packages=_packages,
+ data_files=_data_files,
+ **extra
+ )
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop