Skip to content

Commit

Permalink
Squashed 'externals/coda-oss/' changes from 6af3363..80cee56
Browse files Browse the repository at this point in the history
80cee56 Merge pull request #172 from mdaus/wheel
530989d Specify bin dir in wheel command
76a38a1 Fix spacing issues
61577f3 Remove extraeneous line
6bec950 Move wheel to bin during creation
15e9e4a Set env variable for location of setup.py
11b82ed Fix spacing
084f591 Install setup.py to cwd, remove unused assignments, put wheel straight into bin
5ea9dce Add trailing newline
2f4acf6 Revert accidental change
7f96e7a Don't have to worry about cleaning up extra wheels, since they aren't getting built
2b21629 Don't build dependencies with wheel
481e4de Add package and makewheel commands for distribution
63990c0 Merge pull request #171 from mdaus/fix_pcre_windows
462612b Needing to add PCRE2_STATIC in one more spot for Windows to link properly
fb1bd91 Removing stray printout
8ba069f Merge pull request #138 from mdaus/stdregex
661fa7f Merge pull request #160 from mdaus/pcre2
6158d9f Removed a todo and added a flag in the comment
9f31903 Minor fix to get --install-source working
308a96c Need to add in sys/Conf.h since a sys header isn't getting included in Regex.h now
426339a Added new --enable-std-regex flag and using this to key off of whether PCRE or the STL should be used
5869686 update RegexSTL to handle overlapping regexes; add more edge cases to unit tests
8d554c9 Merge branch 'pcre2' of https://github.com/mdaus/coda-oss into pcre2
3fa9d4d Fixed a number of edge conditions in the PCRE implementation and added more unittest coverage.
c0dbdab Merge branch 'stdregex' into pcre2
430a69c Updating .gitignore with new PCRE subdirectory
9896d1e Added cpp file for common function across PCRE and STL implementations
a60b9bc Style cleanup and removing any duplicate code between the PCRE and STL implementations.  escape() can be static.  Tried to add more details in comments about what the methods provide.
ebfbe74 Updating wscript to reflect target names all with PCRE in them now rather than PCRE2
736efe6 Removing old pcre2 directory
f38f6eb Starting process of moving modules/drivers/pcre2 into modules/drivers/pcre
3ba1287 Removing old PCRE implementation.  Moving new PCRE2 implementation in place.
5a455f8 Got installation of headers and libraries in place.  Added distclean in.
e5dd293 Finishing PCRE2 configure checks and now actually successfully building the library
c0318de Adding part of the logic to build PCRE2 from source tarball... a good chunk of the way through generating the config.h file that we need
8a7af1d Added the ability for untarFile() to send in a mode string so you can use it with .tar.gz files
29434ee Adding PCRE2 tarball
ea10140 Adding a TODO
cd3a99a Replaced tabs with spaces!
ed69970 Improved checking / added a few more unit tests
a034553 Corrected a bunch of indexing with how begin/end differs from before due to us not doing substr() anymore... unit tests all pass now
5dab6f9 allow passing regexp from command line; remove C++11 code
5a958a8 Merge branch 'stdregex' into pcre2
fa5c8e8 Adding more PCRE2 functionality.  Something with the indexing is wrong in searchAll() right now... test_regex does NOT pass
72db0fb Starting to put pcre2_match() into PCRE2 implementation
d8d0543 add a benchmark for re::Regex
58f5bcf Adding partial support for PCRE2
f3177b6 move as much processing as possible to Regex::compile(); start using the std::regex::optimize flag (which doesn't seem to do much)
9ded27b add TEST_THROWS to test whether code throws something (anything)
c9a7823 do our own exception test since TEST_EXCEPTION can't handle STL exceptions
975e42e rename mOvectorCount -> OVECTOR_COUNT
abf85c4 style cleanups; pass exception on to user
29705c2 make OVECCOUNT static; clean up error messages
17e8cd1 make OVECCOUNT static; clean up comments and descriptions
587cf93 remove commented-out code; add "return 0"
121db90 style corrections
df6556d need to clear match vector before use for old PCRE interface; don't include exception testing when CPP11 is disabled
5376a40 move search() with flag parameter to private internal
f68e638 need internal function for passing flags to pcre_exec()
29a62dd remove Regex compile flags parameter
25404b0 remove Regex compile flags parameter
f8aace8 remove Regex search flags parameter
c952d30 copy RegexTest3.cpp into unit tests
76cbc8d expand unit tests
7efae41 convert searchAll() to use searchWithContext()
49540d5 add more unit tests
6609bd4 add tests for ^ or $ in the middle of the string
d2d08c8 add workaround for issue with VS2015 treating "^foo" differently than gcc
39da2e1 fix regex mistake in replaceDot()
f096974 tidy up a few mistakes
20b2ae4 OVECCOUNT should only exist #ifndef __CODA_CPP11
f36e2e1 protected -> private
21cfb2b rename PCRE -> Regex everywhere
bace6dd rename PCRE -> Regex everywhere
38fb81d rename files
05faa44 style fixes
7d19a8b style fixes; convert mOvector to an actual vector
93b0e51 style fixes; remove unused USE_PCRE define; convert mOvector to an actual vector
031db11 fix type for Content-Type
ca06e28 add ability to work with PCRE_DOTALL newline matching
5b43705 add "break" to kill infinite loop on error
5c42c95 add unit test for PCRE_DOTALL flag behavior
adc62ea add second source file for C++11 std::regex, protected by preprocessor define __CODA_CPP11

git-subtree-dir: externals/coda-oss
git-subtree-split: 80cee566df8cf98416cef9290f38bfa61fbbe689
  • Loading branch information
asylvest committed Sep 20, 2016
1 parent 03c64a9 commit eae18b4
Show file tree
Hide file tree
Showing 24 changed files with 1,780 additions and 720 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ target/

modules/drivers/fftw/fftw-2.1.5/
modules/drivers/jpeg/jpeg-9/
modules/drivers/pcre/pcre-5.0/
modules/drivers/pcre/pcre2-10.22/
modules/drivers/uuid/e2fsprogs-1.40-uuid/
modules/drivers/xml/xerces/xerces-c-3.1.1/
modules/drivers/zlib/zlib-1.2.7/
17 changes: 15 additions & 2 deletions build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from dumplib import dumplib
from dumplibraw import dumplibraw
from dumpconfig import dumpconfig
from makewheel import makewheel
from package import package

COMMON_EXCLUDES = '.bzr .bzrignore .git .gitignore .svn CVS .cvsignore .arch-ids {arch} SCCS BitKeeper .hg _MTN _darcs Makefile Makefile.in config.log'.split()
COMMON_EXCLUDES_EXT ='~ .rej .orig .pyc .pyo .bak .tar.bz2 tar.gz .zip .swp'.split()
Expand Down Expand Up @@ -1464,10 +1466,10 @@ def python_package(tg):
def untar(tsk):
untarDriver(tsk.path, tsk.fname)

def untarFile(path, fname):
def untarFile(path, fname, mode='r'):
import tarfile
f = path.find_or_declare(fname)
tf = tarfile.open(f.abspath(), 'r')
tf = tarfile.open(f.abspath(), mode)
p = path.abspath()
for x in tf:
tf.extract(x, p)
Expand Down Expand Up @@ -1831,3 +1833,14 @@ class CPPDumpConfigContext(dumpconfig, CPPContext):
def __init__(self, **kw):
self.waf_command = 'python waf'
super(CPPDumpConfigContext, self).__init__(**kw)

class CPPMakeWheelContext(makewheel, CPPContext):
def __init__(self, **kw):
self.waf_command = 'python waf'
super(CPPMakeWheelContext, self).__init__(**kw)

class CPPPackageContext(package, CPPContext):
def __init__(self, **kw):
self.waf_command = 'python waf'
super(CPPPackageContext, self).__init__(**kw)

28 changes: 28 additions & 0 deletions build/makewheel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from waflib.Build import BuildContext
from waflib import Errors

import glob
import os
import shutil
import subprocess


class makewheel(BuildContext):
'''builds a wheel for easy installation'''
cmd='makewheel'
fun='build'

def execute(self):
self.restore()
if not self.all_envs:
self.load_envs()

if not self.env['SETUP_PY_DIR']:
raise Errors.WafError('Could not make wheel. '
'Unable to find setup.py')
shutil.copyfile(os.path.join(self.env['SETUP_PY_DIR'],
'setup.py'), 'setup.py')
self.to_log('Creating wheel\n')
subprocess.call(['pip', 'wheel', '.', '--wheel-dir', self.env['install_bindir'], '--no-deps'])
os.remove('setup.py')

24 changes: 24 additions & 0 deletions build/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from waflib.Build import BuildContext

import glob
import os
import shutil
import subprocess
from zipfile import ZipFile


class package(BuildContext):
'''Creates a zip file of installation dir, and any wheels'''
cmd='package'
fun='build'

def execute(self):
self.restore()
if not self.all_envs:
self.load_envs()

self.to_log('Zipping installation\n')
installDir = os.path.dirname(self.env['install_bindir'])

shutil.make_archive('install', 'zip', None, installDir)

1 change: 1 addition & 0 deletions modules/c++/include/TestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
# define TEST_ASSERT_LESSER(X1, X2) if ((X1) >= X2) { die_printf("%s (%s,%s,%d): FAILED: Value should be less than\n", testName.c_str(), __FILE__, SYS_FUNC, __LINE__); }
# define TEST_FAIL(msg) die_printf("%s (%s,%s,%d): FAILED: %s\n", testName.c_str(), __FILE__, SYS_FUNC, __LINE__, str::toString(msg).c_str());
# define TEST_EXCEPTION(X) try{ (X); die_printf("%s (%s,%s,%d): FAILED: Should have thrown exception\n", testName.c_str(), __FILE__, SYS_FUNC, __LINE__); } catch (except::Throwable&){}
# define TEST_THROWS(X) try{ (X); die_printf("%s (%s,%s,%d): FAILED: Should have thrown exception\n", testName.c_str(), __FILE__, SYS_FUNC, __LINE__); } catch (...){}
# define TEST_SPECIFIC_EXCEPTION(X,Y) try{ (X); die_printf("%s (%s,%s,%d): FAILED: Should have thrown exception: " # Y , testName.c_str(), __FILE__, SYS_FUNC, __LINE__); } catch(Y&) { } catch (except::Throwable&){ die_printf("%s (%s,%s,%d): FAILED: Should have thrown exception: " # Y , testName.c_str(), __FILE__, SYS_FUNC, __LINE__);}
# define TEST_CASE(X) void X(std::string testName)

Expand Down
10 changes: 5 additions & 5 deletions modules/c++/net/source/NetUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

std::vector<std::string> net::urlSplit(std::string url)
{
re::PCRE regex;
re::Regex regex;
regex.compile(
"([A-Za-z]+)://([^/?#:]+)(?::(\\d+))?(/[^?#:]+)?(?:[?]([^&#/]+(?:[&;][^&;#/]+)*)?)?(?:[#](.*))?");

re::PCREMatch match;
re::RegexMatch match;
if (regex.match(url, match))
{
size_t matchLen = match.size();
Expand Down Expand Up @@ -86,9 +86,9 @@ std::string net::urlJoin(const std::vector<std::string>& parts)
location = parts[idx++];
if (numParts > idx)
{
re::PCRE regex;
re::Regex regex;
regex.compile("\\d+");
re::PCREMatch match;
re::RegexMatch match;
if (regex.match(parts[idx], match))
port = str::toType<int>(parts[idx++]);

Expand All @@ -109,7 +109,7 @@ std::string net::urlJoin(const std::vector<std::string>& parts)
std::string net::quote(std::string s)
{
std::ostringstream quoted;
re::PCRE regex;
re::Regex regex;
regex.compile("[^&\\s]");
for (size_t i = 0, len = s.length(); i < len; ++i)
{
Expand Down
4 changes: 2 additions & 2 deletions modules/c++/re/include/import/re.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#ifndef __IMPORT_RE_H__
#define __IMPORT_RE_H__

#include "re/PCREException.h"
#include "re/PCRE.h"
#include "re/RegexException.h"
#include "re/Regex.h"
#include "re/RegexPredicate.h"

#endif
181 changes: 0 additions & 181 deletions modules/c++/re/include/re/PCRE.h

This file was deleted.

Loading

0 comments on commit eae18b4

Please sign in to comment.