bugfix for setup.py sdist

This commit is contained in:
Thomas Ferreira de Lima 2018-10-08 03:07:52 -04:00
parent 5521c6664a
commit 7852634ffa
No known key found for this signature in database
GPG Key ID: 43E98870EAA0A86E
2 changed files with 25 additions and 10 deletions

11
MANIFEST.in Normal file
View File

@ -0,0 +1,11 @@
recursive-include src/tl/tl *.cc *.h
recursive-include src/db/db *.cc *.h
recursive-include src/gsi/gsi *.cc *.h
recursive-include src/rdb/rdb *.cc *.h
recursive-include src/pya/pya *.cc *.h
recursive-include src/pymod *.cc *.h
include src/plugins/*/db_plugin/*.cc
include src/plugins/*/*/db_plugin/*.cc
include src/plugins/*/db_plugin/*.h
include src/plugins/*/*/db_plugin/*.h
recursive-include src/plugins/common *.h

View File

@ -191,7 +191,7 @@ class Config(object):
"""
Gets the version string
"""
return "0.26.0.dev1"
return "0.26.0.dev2"
config = Config()
@ -201,13 +201,15 @@ config = Config()
_tl_path = os.path.join("src", "tl", "tl")
_tl_sources = glob.glob(os.path.join(_tl_path, "*.cc"))
_tl_sources = set(glob.glob(os.path.join(_tl_path, "*.cc")))
# Exclude sources which are compatible with Qt only
_tl_sources.remove(os.path.join(_tl_path, "tlHttpStreamQt.cc"))
_tl_sources.remove(os.path.join(_tl_path, "tlHttpStreamNoQt.cc"))
_tl_sources.remove(os.path.join(_tl_path, "tlFileSystemWatcher.cc"))
_tl_sources.remove(os.path.join(_tl_path, "tlDeferredExecutionQt.cc"))
# Caveat, in source distribution tarballs from pypi, these files will
# not exist. So we need an error-free discard method instead of list's remove.
_tl_sources.discard(os.path.join(_tl_path, "tlHttpStreamQt.cc"))
_tl_sources.discard(os.path.join(_tl_path, "tlHttpStreamNoQt.cc"))
_tl_sources.discard(os.path.join(_tl_path, "tlFileSystemWatcher.cc"))
_tl_sources.discard(os.path.join(_tl_path, "tlDeferredExecutionQt.cc"))
_tl = Extension(config.root + '._tl',
define_macros=config.macros() + [('MAKE_TL_LIBRARY', 1)],
@ -215,7 +217,7 @@ _tl = Extension(config.root + '._tl',
libraries=['curl', 'expat'],
extra_link_args=config.link_args('_tl'),
extra_compile_args=config.compile_args('_tl'),
sources=_tl_sources)
sources=list(_tl_sources))
# ------------------------------------------------------------------
# _gsi dependency library
@ -249,10 +251,12 @@ _pya = Extension(config.root + '._pya',
# _db dependency library
_db_path = os.path.join("src", "db", "db")
_db_sources = glob.glob(os.path.join(_db_path, "*.cc"))
_db_sources = set(glob.glob(os.path.join(_db_path, "*.cc")))
# Not a real source:
_db_sources.remove(os.path.join(_db_path, "fonts.cc"))
# Caveat, in source distribution tarballs from pypi, these files will
# not exist. So we need an error-free discard method instead of list's remove.
_db_sources.discard(os.path.join(_db_path, "fonts.cc"))
_db = Extension(config.root + '._db',
define_macros=config.macros() + [('MAKE_DB_LIBRARY', 1)],
@ -261,7 +265,7 @@ _db = Extension(config.root + '._db',
language='c++',
extra_link_args=config.link_args('_db'),
extra_compile_args=config.compile_args('_db'),
sources=_db_sources)
sources=list(_db_sources))
# ------------------------------------------------------------------
# _rdb dependency library