mirror of
https://github.com/google/brotli.git
synced 2024-11-24 02:13:27 +08:00
Merge pull request #193 from szabadka/master
Add tools/version.h that contains the brotli version.
This commit is contained in:
commit
c0ac8aa9fc
@ -3,14 +3,13 @@
|
||||
#include <bytesobject.h>
|
||||
#include "../enc/encode.h"
|
||||
#include "../dec/decode.h"
|
||||
#include "../tools/version.h"
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define PyInt_Check PyLong_Check
|
||||
#define PyInt_AsLong PyLong_AsLong
|
||||
#endif
|
||||
|
||||
#define BROTLI_VERSION "0.1.0"
|
||||
|
||||
using namespace brotli;
|
||||
|
||||
static PyObject *BrotliError;
|
||||
|
4
setup.py
4
setup.py
@ -24,8 +24,8 @@ if platform.system() == 'Windows':
|
||||
|
||||
|
||||
def get_version():
|
||||
""" Return BROTLI_VERSION string as defined in 'brotlimodule.cc' file. """
|
||||
brotlimodule = os.path.join(CURR_DIR, 'python', 'brotlimodule.cc')
|
||||
""" Return BROTLI_VERSION string as defined in 'tools/version.h' file. """
|
||||
brotlimodule = os.path.join(CURR_DIR, 'tools', 'version.h')
|
||||
with open(brotlimodule, 'r') as f:
|
||||
for line in f:
|
||||
m = re.match(r'#define\sBROTLI_VERSION\s"(.*)"', line)
|
||||
|
23
tools/version.h
Normal file
23
tools/version.h
Normal file
@ -0,0 +1,23 @@
|
||||
/* Copyright 2015 Google Inc. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Defines a common version string used by all of the brotli tools.
|
||||
*/
|
||||
|
||||
#ifndef BROTLI_TOOLS_VERSION_H_
|
||||
#define BROTLI_TOOLS_VERSION_H_
|
||||
|
||||
#define BROTLI_VERSION "0.3.0"
|
||||
|
||||
#endif /* BROTLI_TOOLS_VERSION_H_ */
|
Loading…
Reference in New Issue
Block a user