Skip to content

Commit

Permalink
Merge pull request #188 from aerospike/2.2.1-candidate
Browse files Browse the repository at this point in the history
2.2.1 candidate
  • Loading branch information
Jeff Boone committed Sep 22, 2017
2 parents 2463e93 + e4695e3 commit 4c68d8a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 47 deletions.
15 changes: 1 addition & 14 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ download the appropriate C client. However, if one is present this will not
happen, and a build may fail against an old client. At that point you should
remove the directory `aerospike-client-c` and run the build command again.

If you see the error `error: need permission to copy the Lua system files to /usr/local/aerospike/lua or change the --lua-system-path`

You may need to either run the command with sudo, or alternatively specify a different location for the Lua system modules to be installed:

python setup.py build --force --lua-system-path=/path/to/lua

### Troubleshooting OS X builds
Building on OS X versions >= 10.11 , may cause a few additional errors to be generated. If the build command fails with an
Expand Down Expand Up @@ -119,11 +114,6 @@ To install the library:

python setup.py install --force

If you see the error `error: need permission to copy the Lua system files to /usr/local/aerospike/lua or change the --lua-system-path`

You may need to either run the command with sudo, or alternatively specify a different location for the Lua system modules to be installed:

python setup.py install --force --lua-system-path=/path/to/lua


### Troubleshooting OS X Installation
Expand All @@ -137,12 +127,9 @@ error similar to: `error: could not create '/usr/local/aerospike/lua': Permissio

Stream UDF functionality requires a local copy of the system Lua modules.
By default, those Lua files are copied to an `aerospike` directory inside of Python's' installation path for system dependent packages. This directory can be viewed by running `python -c "import sys; print(sys.prefix);" `
To store the files in an additional location: specify the additional location with the `--lua-system-path` option to setup.py

python setup.py install --lua-system-path=/path/to/lua


**Note** If the .lua files are stored somewhere besides `/usr/local/aerospike/lua`. and you wish to perform Stream UDF operations it will be necessary to specify the locations of the system modules as a configuration parameter to the Aerospike client constructor:
**Note** The default search location for the lua system files is `/usr/local/aerospike/lua`. If the .lua files are stored somewhere besides `/usr/local/aerospike/lua`. and you wish to perform Stream UDF operations it will be necessary to specify the locations of the system modules as a configuration parameter to the Aerospike client constructor:

config = {'hosts': [('127.0.0.1', 3000)], 'lua': {'system_path': '/path/to/lua'} ...}
my_client = aerospike.client(config)
Expand Down
11 changes: 0 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,6 @@ installations directory for platform specific files. The location of the files c
``pip show -f aerospike``


If you would like the aerospike directory files to be placed into a different location during installation, specify
a ``--lua-system-path`` option when running setup.py:

``python setup.py install --lua-system-path=/path/to/lua/install``

or when running pip:

``pip install aerospike --install-option="--lua-system-path=/path/to/lua/install``"

**Note** Specifying an ``--install-option`` will prevent binary wheels from being used, and will require the extension to be compiled

**Note** If the .lua files are stored somewhere besides `/usr/local/aerospike/lua`. and you wish to perform Stream UDF operations it will be necessary to specify the locations of the system modules as a configuration parameter to the Aerospike client constructor:

config = {'hosts': [('127.0.0.1', 3000)], 'lua': {'system_path': '/path/to/lua'} ...}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
2.2.1
2 changes: 1 addition & 1 deletion doc/aerospike.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ in an in-memory primary index.
server configuration file and match the server's CA certificate. **Note: use of TLS requires Aerospike Enterprise Edition**
* **lua** an optional :class:`dict` containing the paths to two types of Lua modules
* **system_path** the location of the system modules such as ``aerospike.lua`` (default: ``/usr/local/aerospike/lua``)
* **user_path** the location of the user's record and stream UDFs
* **user_path** the location of the user's record and stream UDFs . (default: ``./``)
* **policies** a :class:`dict` of policies
* **timeout** default connection timeout in milliseconds
* **key** default key policy, with values such as :data:`aerospike.POLICY_KEY_DIGEST`
Expand Down
23 changes: 4 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,7 @@ def run(self):
################################################################################


def lua_syspath_error(lua_system_path, exit_code):
print("error: need permission to copy the Lua system files to ",
lua_system_path, "or change the --lua-system-path")
sys.exit(exit_code)


def resolve_c_client(lua_src_path, lua_system_path):
def resolve_c_client(lua_src_path):
global PREFIX, AEROSPIKE_C_VERSION, DOWNLOAD_C_CLIENT
global extra_objects, include_dirs

Expand Down Expand Up @@ -218,15 +212,8 @@ def resolve_c_client(lua_src_path, lua_system_path):
# RESOLVE C CLIENT DEPENDENCY AND LUA SYSTEM PATH
################################################################################

# Determine where the system lua files should be installed to
# this defaults to sys.exec_prefix
lua_system_path = ''
for arg in sys.argv:
if arg[0:17] == '--lua-system-path':
option, val = arg.split('=')
lua_system_path = val.strip()
if lua_system_path:
lua_system_path = os.path.abspath(lua_system_path)


# If the C client is packaged elsewhere, assume the libraries are available
lua_src_path = "modules/aerospike-lua-core/src"
Expand All @@ -252,15 +239,13 @@ def resolve_c_client(lua_src_path, lua_system_path):

# If system-path isn't specified this will install relative to sys.exec_prefix
data_files = [
(os.path.join(lua_system_path, 'aerospike'), []),
(os.path.join(lua_system_path, 'aerospike/usr-lua'), []),
(os.path.join(lua_system_path, 'aerospike/lua'), lua_files)
('aerospike/lua', lua_files)
]

if not has_c_client:
if (('build' in sys.argv or 'build_ext' in sys.argv or
'install' in sys.argv or 'bdist_wheel' in sys.argv)):
resolve_c_client(lua_src_path, lua_system_path)
resolve_c_client(lua_src_path)

################################################################################
# SETUP
Expand Down
2 changes: 1 addition & 1 deletion src/main/aerospike.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ AerospikeConstants operator_constants[] = {
MOD_INIT(aerospike)
{

const char version[8] = "2.2.0";
const char version[8] = "2.2.1";
// Makes things "thread-safe"
PyEval_InitThreads();
int i = 0;
Expand Down

0 comments on commit 4c68d8a

Please sign in to comment.