mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 11:51:05 -05:00
Unified version: Python 3-compatible replacement for execfile
This commit is contained in:
@@ -18,7 +18,11 @@ import sys, os
|
|||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('..'))
|
||||||
|
|
||||||
execfile('../djrill/_version.py')
|
# define __version__ and __minor_version__ from ../djrill/_version.py,
|
||||||
|
# but without importing from djrill (which would make docs dependent on Django, etc.)
|
||||||
|
with open("../djrill/_version.py") as f:
|
||||||
|
code = compile(f.read(), "../djrill/_version.py", 'exec')
|
||||||
|
exec(code)
|
||||||
|
|
||||||
# -- General configuration -----------------------------------------------------
|
# -- General configuration -----------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
7
setup.py
7
setup.py
@@ -1,6 +1,11 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
import re
|
import re
|
||||||
execfile('djrill/_version.py') # defines __version__, __minor_version__
|
|
||||||
|
# define __version__ and __minor_version__ from djrill/_version.py,
|
||||||
|
# but without importing from djrill (which would break setup)
|
||||||
|
with open("djrill/_version.py") as f:
|
||||||
|
code = compile(f.read(), "djrill/_version.py", 'exec')
|
||||||
|
exec(code)
|
||||||
|
|
||||||
|
|
||||||
def long_description_from_readme(rst):
|
def long_description_from_readme(rst):
|
||||||
|
|||||||
Reference in New Issue
Block a user