Set version in one file and one file alone.
This commit is contained in:
parent
1dda3f5522
commit
e8817b6617
@ -876,6 +876,8 @@ Oh, and: plankton.\n");
|
||||
PylibMCExc_MemcachedError = PyErr_NewException(
|
||||
"_pylibmc.MemcachedError", NULL, NULL);
|
||||
|
||||
PyModule_AddStringConstant(module, "__version__", PYLIBMC_VERSION);
|
||||
|
||||
Py_INCREF(&PylibMC_ClientType);
|
||||
PyModule_AddObject(module, "client", (PyObject *)&PylibMC_ClientType);
|
||||
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include <Python.h>
|
||||
#include <libmemcached/memcached.h>
|
||||
|
||||
#include "pylibmc-version.h"
|
||||
|
||||
/* Py_ssize_t appeared in Python 2.5. */
|
||||
#ifndef PY_SSIZE_T_MAX
|
||||
typedef ssize_t Py_ssize_t;
|
||||
|
1
pylibmc-version.h
Normal file
1
pylibmc-version.h
Normal file
@ -0,0 +1 @@
|
||||
#define PYLIBMC_VERSION "0.7.4"
|
@ -24,7 +24,7 @@ minor differences. If you should happen to spot any, file a bug!
|
||||
import _pylibmc
|
||||
|
||||
__all__ = ["hashers", "distributions", "Client"]
|
||||
__version__ = "0.7.4"
|
||||
__version__ = _pylibmc.__version__
|
||||
|
||||
hashers, hashers_rvs = {}, {}
|
||||
distributions, distributions_rvs = {}, {}
|
||||
|
3
setup.py
3
setup.py
@ -10,12 +10,13 @@ if "LIBMEMCACHED_DIR" in os.environ:
|
||||
libdirs.append(os.path.join(libdir, "lib"))
|
||||
|
||||
readme_text = open("README.rst", "U").read()
|
||||
version = open("pylibmc-version.h", "U").read().strip().split("\"")[1]
|
||||
|
||||
pylibmc_ext = Extension("_pylibmc", ["_pylibmcmodule.c"],
|
||||
libraries=["memcached"],
|
||||
include_dirs=incdirs, library_dirs=libdirs)
|
||||
|
||||
setup(name="pylibmc", version="0.7.4",
|
||||
setup(name="pylibmc", version=version,
|
||||
url="http://lericson.blogg.se/code/category/pylibmc.html",
|
||||
author="Ludvig Ericson", author_email="ludvig@lericson.se",
|
||||
license="3-clause BSD <http://www.opensource.org/licenses/bsd-license.php>",
|
||||
|
Reference in New Issue
Block a user