コード例 #1
0
    def _next_transaction_id(self):
        last_id_file = self._last_id_file

        last_id = 0
        if path.isfile(last_id_file):
            # TODO handle open and read errors
            # TODO handle parse errors
            last_id = int(fileio.read_all(last_id_file))

        return "%.010d" % (last_id + 1)
コード例 #2
0
#!/usr/bin/env python
import setuptools
import symstore
from symstore import fileio

setuptools.setup(name="symstore",
                 version=symstore.VERSION,
                 description="publish PDB and PE files to symbols store",
                 long_description=fileio.read_all("README.rst"),
                 url="https://github.com/elmirjagudin/symstore",
                 classifiers=[
                     "Intended Audience :: Developers",
                     "Programming Language :: Python :: 2.7",
                     "Programming Language :: Python :: 3",
                     "Programming Language :: Python :: 3.4",
                     "Programming Language :: Python :: 3.5",
                     "Programming Language :: Python :: 3.6",
                     "Programming Language :: Python :: 3.7",
                     "Programming Language :: Python :: 3.8",
                 ],
                 license="MIT",
                 keywords="development symstore pdb",
                 packages=["symstore"],
                 package_data={"symstore": ["VERSION"]},
                 data_files=[("", ["LICENSE"])],
                 entry_points={
                     "console_scripts":
                     ["symstore=symstore.command_line:main"],
                 },
                 extras_require={"develop": ["coverage", "flake8", "mock"]})
コード例 #3
0
    def read(self):
        if self.compressed:
            raise NotImplementedError("reading compressed data not supported")

        fpath = path.join(self._dest_dir(), self.file_name)
        return fileio.read_all(fpath, "rb")
コード例 #4
0
ファイル: version.py プロジェクト: filipkofron/symstore
from os import path
from symstore import fileio

ver_path = path.join(path.dirname(__file__), "VERSION")
VERSION = fileio.read_all(ver_path).strip()