jlec        15/02/20 10:28:32

  Added:                bkchem-0.14.0_pre2-nolauncher.patch
  Log:
  Drop old; move to EAPI=5 and new pythen eclasses
  
  (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 
B9D4F231BD1558AB!)

Revision  Changes    Path
1.1                  
sci-chemistry/bkchem/files/bkchem-0.14.0_pre2-nolauncher.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/bkchem/files/bkchem-0.14.0_pre2-nolauncher.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/bkchem/files/bkchem-0.14.0_pre2-nolauncher.patch?rev=1.1&content-type=text/plain

Index: bkchem-0.14.0_pre2-nolauncher.patch
===================================================================
 bkchem/bkchem.py | 24 +++++++++++++-----------
 setup.py         | 23 -----------------------
 2 files changed, 13 insertions(+), 34 deletions(-)

diff --git a/bkchem/bkchem.py b/bkchem/bkchem.py
index b336b9c..bcb68b0 100644
--- a/bkchem/bkchem.py
+++ b/bkchem/bkchem.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python2
 #--------------------------------------------------------------------------
 #     This file is part of BKChem - a chemical drawing program
 #     Copyright (C) 2002-2009 Beda Kosata <[email protected]>
@@ -18,18 +19,19 @@
 #--------------------------------------------------------------------------
 
 
-"""this is just a starter of the application"""
+#"""this is just a starter of the application"""
 
 ## support for loading from outside of bkchem dir
 
-import os_support, sys
+from bkchem import os_support
+import sys
 sys.path.insert( 1, os_support.get_module_path())
 
 
 ### now starting for real
 
-from singleton_store import Store
-import pref_manager
+from bkchem.singleton_store import Store
+from bkchem import pref_manager
 
 # at first preference manager
 Store.pm = pref_manager.pref_manager(
@@ -78,13 +80,13 @@ else:
 
 
 
-import config
+from bkchem import config
 
 if not config.debug:
   # checking of important modules availability
   # import modules
-  import import_checker
-  import messages
+  from bkchem import import_checker
+  from bkchem import messages
 
   # we need sets from the 2.3 version
   if not import_checker.python_version_ok:
@@ -103,16 +105,16 @@ if not config.debug:
 
   
 #import Tkinter
-from main import BKChem
-from splash import Splash
-from singleton_store import Store
+from bkchem.main import BKChem
+from bkchem.splash import Splash
+from bkchem.singleton_store import Store
 
 myapp = BKChem()
 myapp.withdraw()
 
 if __name__ == '__main__':
 
-  import messages
+  from bkchem import messages
   enc = sys.getfilesystemencoding()
   if not enc:
     enc = sys.getdefaultencoding()
diff --git a/setup.py b/setup.py
index d4b2a21..2319216 100755
--- a/setup.py
+++ b/setup.py
@@ -91,26 +91,3 @@ if len( sys.argv) > 1 and sys.argv[1] == 'install' and 
'--help' not in sys.argv:
   print "file %s created" % config_name
 
 
-  # the executable
-  if not os.path.isdir( bin_dir):
-    try:
-      os.mkdir( bin_dir)
-    except:
-      print "ERROR: could not create directory %s" % bin_dir
-      sys.exit( 201)      
-  exec_name = os.path.join( bin_dir, 'bkchem')
-  try:
-    file = open( exec_name, 'w')
-  except:
-    print "ERROR: couldn't open the file %s for write" %  exec_name
-    sys.exit( 201)
-  file.write( "#!/bin/sh\n")
-  file.write( 'python %s "$@"\n' % strip_path( os.path.join( py_dir, "bkchem", 
"bkchem.py")))
-  file.close()
-  print "file %s created" % exec_name
-  try:
-    os.chmod( os.path.join( bin_dir, 'bkchem'), 5+5*8+7*8*8)
-  except:
-    print "ERROR: failed to make %s executable" % exec_name
-    sys.exit( 201)
-  print "file %s made executable" % exec_name




Reply via email to