mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
Merge remote-tracking branch 'origin/master' into flub-sqlite
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
0.600.1
|
||||||
|
---------
|
||||||
|
|
||||||
|
- introduce automatic versioning via setuptools_scm,
|
||||||
|
based on py-X.Y.Z tags
|
||||||
|
|
||||||
|
|
||||||
0.600.0
|
0.600.0
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
|||||||
2
python/liveconfig3
Normal file
2
python/liveconfig3
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
addr=digtest1@testrun.org mail_pw=diggydug
|
||||||
|
addr=digtest2@testrun.org mail_pw=diggydug
|
||||||
@@ -4,14 +4,19 @@ import re
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
long_description, version = read_meta()
|
with open("README.rst") as f:
|
||||||
|
long_description = f.read()
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='deltachat',
|
name='deltachat',
|
||||||
version=version,
|
setup_requires=['setuptools_scm', 'cffi>=1.0.0'],
|
||||||
|
use_scm_version = {
|
||||||
|
"root": "..",
|
||||||
|
"relative_to": __file__,
|
||||||
|
'tag_regex': r'^(?P<prefix>py-)?(?P<version>[^\+]+)(?P<suffix>.*)?$',
|
||||||
|
},
|
||||||
description='Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat',
|
description='Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
author='holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors',
|
author='holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors',
|
||||||
setup_requires=['cffi>=1.0.0'],
|
|
||||||
install_requires=['cffi>=1.0.0', 'attrs', 'six'],
|
install_requires=['cffi>=1.0.0', 'attrs', 'six'],
|
||||||
packages=setuptools.find_packages('src'),
|
packages=setuptools.find_packages('src'),
|
||||||
package_dir={'': 'src'},
|
package_dir={'': 'src'},
|
||||||
@@ -27,18 +32,5 @@ def main():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def read_meta():
|
|
||||||
with open(os.path.join("src", "deltachat", "__init__.py")) as f:
|
|
||||||
for line in f:
|
|
||||||
m = re.match('__version__ = "(\S*).*"', line)
|
|
||||||
if m:
|
|
||||||
version, = m.groups()
|
|
||||||
break
|
|
||||||
|
|
||||||
with open("README.rst") as f:
|
|
||||||
long_desc = f.read()
|
|
||||||
return long_desc, version
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -2,7 +2,12 @@ from deltachat import capi, const
|
|||||||
from deltachat.capi import ffi
|
from deltachat.capi import ffi
|
||||||
from deltachat.account import Account # noqa
|
from deltachat.account import Account # noqa
|
||||||
|
|
||||||
__version__ = "0.600.0"
|
from pkg_resources import get_distribution, DistributionNotFound
|
||||||
|
try:
|
||||||
|
__version__ = get_distribution(__name__).version
|
||||||
|
except DistributionNotFound:
|
||||||
|
# package is not installed
|
||||||
|
__version__ = "0.0.0.dev0-unknown"
|
||||||
|
|
||||||
|
|
||||||
_DC_CALLBACK_MAP = {}
|
_DC_CALLBACK_MAP = {}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import tempfile
|
|||||||
import platform
|
import platform
|
||||||
import os
|
import os
|
||||||
import cffi
|
import cffi
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
def ffibuilder():
|
def ffibuilder():
|
||||||
@@ -66,7 +67,8 @@ def ffibuilder():
|
|||||||
distutils.log.set_verbosity(distutils.log.INFO)
|
distutils.log.set_verbosity(distutils.log.INFO)
|
||||||
cc = distutils.ccompiler.new_compiler(force=True)
|
cc = distutils.ccompiler.new_compiler(force=True)
|
||||||
distutils.sysconfig.customize_compiler(cc)
|
distutils.sysconfig.customize_compiler(cc)
|
||||||
with tempfile.TemporaryDirectory() as tmpdir:
|
tmpdir = tempfile.mkdtemp()
|
||||||
|
try:
|
||||||
src_name = os.path.join(tmpdir, "prep.h")
|
src_name = os.path.join(tmpdir, "prep.h")
|
||||||
dst_name = os.path.join(tmpdir, "prep2.c")
|
dst_name = os.path.join(tmpdir, "prep2.c")
|
||||||
with open(src_name, "w") as src_fp:
|
with open(src_name, "w") as src_fp:
|
||||||
@@ -77,6 +79,8 @@ def ffibuilder():
|
|||||||
macros=[('PY_CFFI', '1')])
|
macros=[('PY_CFFI', '1')])
|
||||||
with open(dst_name, "r") as dst_fp:
|
with open(dst_name, "r") as dst_fp:
|
||||||
builder.cdef(dst_fp.read())
|
builder.cdef(dst_fp.read())
|
||||||
|
finally:
|
||||||
|
shutil.rmtree(tmpdir)
|
||||||
|
|
||||||
builder.cdef("""
|
builder.cdef("""
|
||||||
extern "Python" uintptr_t py_dc_callback(
|
extern "Python" uintptr_t py_dc_callback(
|
||||||
|
|||||||
15
python/tests/package_wheels.py
Normal file
15
python/tests/package_wheels.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
assert len(sys.argv) == 2
|
||||||
|
wheelhousedir = sys.argv[1]
|
||||||
|
# pip wheel will build in an isolated tmp dir that does not have git
|
||||||
|
# history so setuptools_scm can not automatically determine a
|
||||||
|
# version there. So pass in the version through an env var.
|
||||||
|
version = subprocess.check_output(["python", "setup.py", "--version"]).strip().split(b"\n")[-1]
|
||||||
|
os.environ["SETUPTOOLS_SCM_PRETEND_VERSION"] = version.decode("ascii")
|
||||||
|
subprocess.check_call(("pip wheel . -w %s" % wheelhousedir).split())
|
||||||
@@ -9,7 +9,7 @@ envlist =
|
|||||||
[testenv]
|
[testenv]
|
||||||
commands =
|
commands =
|
||||||
pytest -rsXx {posargs:tests}
|
pytest -rsXx {posargs:tests}
|
||||||
pip wheel . -w {toxworkdir}/wheelhouse
|
python tests/package_wheels.py {toxworkdir}/wheelhouse
|
||||||
passenv =
|
passenv =
|
||||||
TRAVIS
|
TRAVIS
|
||||||
DCC_RS_DEV
|
DCC_RS_DEV
|
||||||
@@ -27,7 +27,6 @@ commands =
|
|||||||
[testenv:lint]
|
[testenv:lint]
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
basepython = python3.5
|
|
||||||
deps =
|
deps =
|
||||||
flake8
|
flake8
|
||||||
# pygments required by rst-lint
|
# pygments required by rst-lint
|
||||||
|
|||||||
Reference in New Issue
Block a user