Commits

Simone Dalla committed d52df3b

Corretti alcuni bug e aggiunta la descrizione.

Comments (0)

Files changed (1)

 # -*- coding: utf-8 -*-
 
 import os
+import sys
 import shutil
 import logging
 
     ez_setup.use_setuptools()
     from setuptools import setup, find_packages
 
-version = '0.1.1'
+
+version = '0.1.2'
 
 setup(
     name = 'PyGmount',
     author_email = 'simodalla@gmail.com',
     packages=find_packages(),
     namespace_packages = ['pygmount'],
-    #scripts = ['pygmount/bin/mount_smb_shares.py'],
+    description = u"Commands for interactive process to mount samba's shares.",
+    url = 'https://bitbucket.org/simodalla/pygmount',
     entry_points = {
         'console_scripts' : [
             'mount-smb-shares = pygmount.bin.mount_smb_shares:main'
     test_suite = 'tests.tests'
 )
 
-ABSOLUTE_PATH = '%s' % os.path.abspath(
-    os.path.dirname(locals()['__file__'])).replace('\\','/')
+if 'install' in sys.argv:
+    ABSOLUTE_PATH = '%s' % os.path.abspath(
+        os.path.dirname(locals()['__file__'])).replace('\\','/')
 
-desktop_applications = '/usr/share/applications/'
-if os.path.exists(desktop_applications):
-    try:
-        shutil.copy(ABSOLUTE_PATH + '/media/mount-smb-shares.desktop', desktop_applications)
-    except IOError:
-        logging.error(u"Non si hanno i diritti di copiare il file 'lanciatore' per il menù")
+    desktop_applications = '/usr/share/applications/'
+    if os.path.exists(desktop_applications):
+        try:
+            shutil.copy(ABSOLUTE_PATH + '/media/mount-smb-shares.desktop', desktop_applications)
+        except IOError:
+            logging.error(u"Non si hanno i diritti di copiare il file 'lanciatore' per il menù")