Commits

Johannes Köster committed 4a0c8ef

Use inspect to get path of entry point.

  • Participants
  • Parent commits b320fda

Comments (0)

Files changed (1)

File snakemake/__init__.py

 import multiprocessing
 import re
 import sys
+import inspect
 
 from snakemake.workflow import Workflow
 from snakemake.exceptions import print_exception
 
     args = parser.parse_args()
 
-    snakemakepath = os.path.realpath(__file__)
+    snakemakepath = os.path.realpath(inspect.getmodule(inspect.stack()[1][0]).__file__)
 
     try:
         resources = parse_resources(args)