Commit 48f8bb1b authored by Kirill Smelkov's avatar Kirill Smelkov

X Stub ZODB/persistent/BTrees/ZEO have to be installed manually for...

X Stub ZODB/persistent/BTrees/ZEO have to be installed manually for forward-compatibility with ZODB4 and ZODB5

Else installing any egg that depends on 'ZODB' (not 'ZODB3') will pull
in ZODB5. Example of those eggs are zodbtools, zodburi, ...
parent 2ae17366
../ZODB/setup.py
\ No newline at end of file
../ZODB/setup.py
\ No newline at end of file
# XXX doc
from setuptools import setup
from os.path import basename, dirname, join
import re
# find our name (ZODB/BTrees/persistent/ZEO)
NAME = basename(dirname(__file__)) # .../ZODB45-compat/ZODB/setup.py -> ZODB
# find out ZODB3 version
# grep searches text for pattern.
# return re.Match object or raises if pattern was not found.
def grep1(pattern, text):
rex = re.compile(pattern, re.MULTILINE)
m = rex.search(text)
if m is None:
raise RuntimeError('%r not found' % pattern)
return m
# read file content
def readfile(path):
with open(path, 'r') as f:
return f.read()
_ = readfile(join(dirname(__file__), '../../setup.py'))
_ = grep1('^VERSION = "(.*)"$', _)
VERSION = _.group(1)
# setup stub ZODB/BTrees/... egg that just depends on ZODB3
setup(name=NAME,
version=VERSION,
packages = [],
install_requires = ['ZODB3 == %s' % VERSION],
)
../ZODB/setup.py
\ No newline at end of file
......@@ -182,6 +182,12 @@ long_description = str(
)+ '''\n\n.. |Lowis| unicode:: L \\xf6 wis\n'''
setup(name="ZODB3",
# XXX there is also provides-dist
# -> https://packaging.python.org/specifications/core-metadata/#rarely-used-fields
# https://www.python.org/dev/peps/pep-0314/#provides-multiple-use
# https://www.python.org/dev/peps/pep-0345/#provides-dist-multiple
#
# https://github.com/pypa/packaging-problems/issues/154 (obsoletes/provides not supported)
provides=["ZODB", "persistent", "BTrees", "ZEO"], # XXX doc
version=VERSION,
maintainer="Zope Foundation and Contributors",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment