Skip to content
Permalink
Browse files

Added the path to the decorator module in the virtual file path

  • Loading branch information...
micheles committed Jul 27, 2018
1 parent bbac0b4 commit eb890d98739196b83f1ecb5cb7bcfe9739a9502c
Showing with 3 additions and 2 deletions.
  1. +1 −1 setup.py
  2. +2 −1 src/decorator.py
@@ -1,6 +1,6 @@
from setuptools import setup

dic = {}
dic = dict(__file__=None)
exec(open('src/decorator.py').read(), dic)
VERSION = dic['__version__']

@@ -173,7 +173,8 @@ def make(self, src_templ, evaldict=None, addsource=False, **attrs):
# Ensure each generated function has a unique filename for profilers
# (such as cProfile) that depend on the tuple of (<filename>,
# <definition line>, <function name>) being unique.
filename = '<decorator-gen-%d>' % (next(self._compile_count),)
filename = '<%s:decorator-gen-%d>' % (
__file__, next(self._compile_count))
try:
code = compile(src, filename, 'single')
exec(code, evaldict)

0 comments on commit eb890d9

Please sign in to comment.
You can’t perform that action at this time.