Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include *.txt LICENSE CONTRIBUTING.md BUILDING.md CMakeLists.txt pyproject.toml couchbase_columnar_version.py pycbcc_build_setup.py
include couchbase-sdk-python-black-duck-manifest.yaml
include columnar-sdk-python-black-duck-manifest.yaml
include couchbase_columnar/common/core/nonprod_certificates/*.pem
recursive-include couchbase_columnar *.py
recursive-include acouchbase_columnar *.py
recursive-include src *.[ch]xx
Expand Down
3 changes: 3 additions & 0 deletions couchbase_columnar/common/core/_certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ def get_nonprod_certificates() -> List[str]:
Returns:
List[str]: List of nonprod Capella certificates.
"""
import os
import warnings
from pathlib import Path
warnings.warn('Only use non-prod certificate in DEVELOPMENT environments.', ResourceWarning)
nonprod_cert_dir = Path(Path(__file__).resolve().parent, 'nonprod_certificates')
nonprod_certs: List[str] = []
for cert in nonprod_cert_dir.iterdir():
if os.path.isdir(cert):
continue
nonprod_certs.append(cert.read_text())
return nonprod_certs
Empty file.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@
PYCBCC_VERSION = couchbase_columnar_version.get_version()


package_data = {}
package_data = {'couchbase_columnar.common.core.nonprod_certificates': ['*.pem']}
# some more Windows tomfoolery...
# TODO: verify this works w/ cb2 updates
if platform.system() == 'Windows':
package_data = {'couchbase_columnar.protocol': ['pycbcc_core.pyd']}
package_data.update(**{'couchbase_columnar.protocol': ['pycbcc_core.pyd']})


print(f'Python Columnar SDK version: {PYCBCC_VERSION}')

setup(name='couchbase_columnar',
version=PYCBCC_VERSION,
ext_modules=[CMakeExtension('couchbase_columnar.protocol.pycbcc_core')],
cmdclass={'build': BuildCommand, 'build_ext': CMakeBuildExt, 'configure_ext': CMakeConfigureExt},
python_requires='>=3.7',
python_requires='>=3.8',
packages=find_packages(
include=['acouchbase_columnar', 'couchbase_columnar', 'acouchbase_columnar.*', 'couchbase_columnar.*'],
exclude=['acouchbase_columnar.tests', 'couchbase_columnar.tests']),
Expand Down