Make tox work with python 3.11
All checks were successful
buildbot/django-dav-events--test Build done.
All checks were successful
buildbot/django-dav-events--test Build done.
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
# common dist files
|
||||
include README.rst INSTALL.rst
|
||||
include setup.py requirements.txt
|
||||
# dav_base
|
||||
recursive-include dav_base/console_scripts/django_project_config *.py
|
||||
recursive-include dav_base/static *
|
||||
|
||||
@@ -4,10 +4,7 @@ import os
|
||||
from tempfile import mkdtemp as _mkdtemp
|
||||
|
||||
|
||||
def mkdtemp(prefix):
|
||||
dirname = os.path.dirname
|
||||
pkg_base_dir = dirname(dirname(dirname(__file__)))
|
||||
tmp_dir = os.path.join(pkg_base_dir, 'tmp')
|
||||
if not os.path.exists(tmp_dir):
|
||||
os.makedirs(tmp_dir)
|
||||
return _mkdtemp(prefix=prefix, dir=tmp_dir)
|
||||
def mkdtemp(prefix, base_dir):
|
||||
if not os.path.exists(base_dir):
|
||||
os.makedirs(base_dir)
|
||||
return _mkdtemp(prefix=prefix, dir=base_dir)
|
||||
|
||||
4
setup.py
4
setup.py
@@ -92,9 +92,9 @@ class QuickSetup(MyCommand):
|
||||
|
||||
setup(
|
||||
name='django-dav-events',
|
||||
version='2.1',
|
||||
version='2.1.2',
|
||||
description='A django based web application project to organize DAV Events.',
|
||||
url='https://touren.alpenverein-karlsruhe.de',
|
||||
url='https://dev.heinzelwerk.de/git/DAV-KA/django-dav-events',
|
||||
author='Jens Kleineheismann',
|
||||
author_email='heinzel@alpenverein-karlsruhe.de',
|
||||
cmdclass={
|
||||
|
||||
@@ -11,6 +11,7 @@ from dav_base.tests.utils import mkdtemp
|
||||
|
||||
# from dav_base.console_scripts.admin import DJANGO_MAIN_MODULE
|
||||
DJANGO_MAIN_MODULE = 'main'
|
||||
TMP_BASE_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'tmp')
|
||||
|
||||
|
||||
class DjangoEnvironment:
|
||||
@@ -42,7 +43,7 @@ class DjangoEnvironment:
|
||||
prefix = 'testrun-{datetime}-'.format(
|
||||
datetime=datetime.datetime.now().strftime('%Y%m%d-%H%M')
|
||||
)
|
||||
self.path = mkdtemp(prefix=prefix)
|
||||
self.path = mkdtemp(prefix=prefix, base_dir=TMP_BASE_DIR)
|
||||
|
||||
self._install_djangoproject(self.path, modules=self._enable_modules)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user