Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Add Python 3.3+ and Windows support #169

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d87c158
Added a Windows's version of buildCommand
tcalmant Dec 2, 2015
e0f45fa
Use StringUtils.join to make OS agnostic path names
tcalmant Dec 2, 2015
b4e1b7d
Use File.separator instead of System.getProperty(...)
tcalmant Dec 2, 2015
f0196ee
setup.py: call Maven directly if make is missing
tcalmant Dec 3, 2015
80b57d0
Add support for wheel generation
tcalmant Dec 3, 2015
9bece23
Register the bdist_wheel customization
tcalmant Dec 3, 2015
86702d4
Use entry_points instead of scripts in setup.py
tcalmant Dec 3, 2015
6a2fc18
Correct the regular expression in cli.build._zip_dir
tcalmant Dec 3, 2015
1920d36
Corrected tests to use OS-independent paths
tcalmant Dec 3, 2015
84927ea
PyleusTopologyBuilder constants are in-jar paths
tcalmant Dec 4, 2015
47b199e
Use cmd to run the Python interpreter on Windows
tcalmant Dec 8, 2015
3ffcd6d
New venv_proxy, for Python 3.3+
tcalmant Dec 3, 2015
12035cc
Use the venv_proxy when venv is available
tcalmant Dec 3, 2015
247af2b
Reuse the VirtualenvError instead of OSError in venv_proxy
tcalmant Dec 3, 2015
8f7d539
Skip virtualenv test on Python 3.3+
tcalmant Dec 3, 2015
b183a3e
Added tests for venv_proxy
tcalmant Dec 3, 2015
fef9c6c
Import print_function from __future__ where print is used.
tcalmant Dec 3, 2015
9315330
Correction of the regex generation in _zip_dir
tcalmant Dec 4, 2015
530c255
word_count example: write logs in the gettempdir() folder
tcalmant Dec 4, 2015
a5abc3e
Use pytest.skip to avoid failing venv tests on an ImportError
tcalmant Dec 8, 2015
9924707
shutil.which didn't exist before Python 3.3
tcalmant Dec 8, 2015
5593ac2
Ensure we use stdin and stdout in binary mode
tcalmant Dec 8, 2015
02dfb57
Force encoding to UTF-8 in msgpack serializer
tcalmant Dec 8, 2015
51cad35
Correction for pyflakes (unused import in tests)
tcalmant Dec 8, 2015
29b7add
Updated tests to work only with strings
tcalmant Dec 8, 2015
61edc9e
Updated all examples to work on Windows
tcalmant Dec 8, 2015
575f86c
Call pip using "python -m"
tcalmant Jan 20, 2016
2282346
Added support for mixed operating systems
tcalmant Dec 21, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from collections import defaultdict
import logging
import time
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand Down Expand Up @@ -74,7 +76,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/apparent_temperature_heat_index.log',
filename=os.path.join(tempfile.gettempdir(),
'apparent_temperature_heat_index.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from collections import namedtuple
import random
import os
import tempfile

from apparent_temperature.measure_generator import MeasureGeneratorSpout

Expand Down Expand Up @@ -45,7 +47,8 @@ def log(self, measure):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/apparent_temperature_humidity.log',
filename=os.path.join(tempfile.gettempdir(),
'apparent_temperature_humidity.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from collections import namedtuple
import random
import os
import tempfile

from apparent_temperature.measure_generator import MeasureGeneratorSpout

Expand Down Expand Up @@ -45,7 +47,8 @@ def log(self, measure):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/apparent_temperature_temperature.log',
filename=os.path.join(tempfile.gettempdir(),
'apparent_temperature_temperature.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from collections import defaultdict
import logging
import time
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand Down Expand Up @@ -59,7 +61,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/apparent_temperature_wind_chill.log',
filename=os.path.join(tempfile.gettempdir(),
'apparent_temperature_wind_chill.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from collections import namedtuple
import random
import os
import tempfile

from apparent_temperature.measure_generator import MeasureGeneratorSpout

Expand Down Expand Up @@ -45,7 +47,8 @@ def log(self, measure):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/apparent_temperature_wind_speed.log',
filename=os.path.join(tempfile.gettempdir(),
'apparent_temperature_wind_speed.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from collections import namedtuple
from random import choice
import time
import os
import tempfile

from pyleus.storm import Spout

Expand All @@ -13,7 +15,7 @@

Request = namedtuple("Request", "ip_address request size")

_dash_to_zero = lambda size: 0 if size == "-" else long(size)
_dash_to_zero = lambda size: 0 if size == "-" else int(size)


class AccessLogGeneratorSpout(Spout):
Expand Down Expand Up @@ -48,7 +50,8 @@ def next_tuple(self):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/bandwith_monitoring_access_log_generator.log',
filename=os.path.join(tempfile.gettempdir(),
'bandwith_monitoring_access_log_generator.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import logging
from collections import defaultdict
from collections import namedtuple
import os
import tempfile

from pyleus.storm import SimpleBolt
from bandwith_monitoring.access_log_generator import Request
Expand Down Expand Up @@ -71,7 +73,8 @@ def advance_window(self):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/bandwith_monitoring_traffic_aggregator.log',
filename=os.path.join(tempfile.gettempdir(),
'bandwith_monitoring_traffic_aggregator.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import logging
import time
import os
import tempfile

from pyleus.storm import SimpleBolt
from bandwith_monitoring.traffic_aggregator import Traffic

Expand All @@ -28,7 +31,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/bandwith_monitoring_traffic_monitor.log',
filename=os.path.join(tempfile.gettempdir(),
'bandwith_monitoring_traffic_monitor.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from __future__ import absolute_import

import logging
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand All @@ -27,7 +29,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/exclamation_bolt.log',
filename=os.path.join(tempfile.gettempdir(),
'exclamation_bolt.log'),
filemode='a',
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import random
import time
import os
import tempfile

from pyleus.storm import Spout

Expand All @@ -27,7 +29,8 @@ def next_tuple(self):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/exclamation_spout.log',
filename=os.path.join(tempfile.gettempdir(),
'exclamation_spout.log'),
filemode='a',
)

Expand Down
5 changes: 4 additions & 1 deletion examples/micro/micro/converter_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import logging
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand Down Expand Up @@ -44,7 +46,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/micro_conversions.log',
filename=os.path.join(tempfile.gettempdir(),
'micro_conversions.log'),
format="%(message)s",
filemode='a',
)
Expand Down
5 changes: 4 additions & 1 deletion examples/micro/micro/earnings_bolt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import logging
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand Down Expand Up @@ -29,7 +31,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/micro_earnings.log',
filename=os.path.join(tempfile.gettempdir(),
'micro_earnings.log'),
format="%(message)s",
filemode='a',
)
Expand Down
5 changes: 4 additions & 1 deletion examples/micro/micro/micro_generator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import logging
import random
import time
import os
import tempfile

from pyleus.storm import Spout

Expand Down Expand Up @@ -33,7 +35,8 @@ def next_tuple(self):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/micro_microtransactions.log',
filename=os.path.join(tempfile.gettempdir(),
'micro_microtransactions.log'),
format="%(message)s",
filemode='a',
)
Expand Down
5 changes: 4 additions & 1 deletion examples/micro/micro/rates_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import logging
import random
import time
import os
import tempfile

from pyleus.storm import Spout

Expand All @@ -28,7 +30,8 @@ def next_tuple(self):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/micro_exchange_rates.log',
filename=os.path.join(tempfile.gettempdir(),
'micro_exchange_rates.log'),
format="%(message)s",
filemode='a',
)
Expand Down
5 changes: 4 additions & 1 deletion examples/top_urls/top_urls/fields.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from collections import namedtuple
import logging
import os
import tempfile

from pyleus.json_fields_bolt import JSONFieldsBolt

Expand Down Expand Up @@ -27,7 +29,8 @@ def extract_fields(self, json_dict):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/top_urls_fields.log',
filename=os.path.join(tempfile.gettempdir(),
'top_urls_fields.log'),
filemode='a',
)

Expand Down
5 changes: 4 additions & 1 deletion examples/top_urls/top_urls/log_top.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import datetime
import logging
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand All @@ -20,7 +22,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/top_urls_result.log',
filename=os.path.join(tempfile.gettempdir(),
'top_urls_result.log'),
filemode='a',
)

Expand Down
5 changes: 4 additions & 1 deletion examples/top_urls/top_urls/requests_generator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from __future__ import absolute_import

import logging
import os
import tempfile

from random import choice
import time
Expand Down Expand Up @@ -58,7 +60,8 @@ def next_tuple(self):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/top_urls_requests_generator.log',
filename=os.path.join(tempfile.gettempdir(),
'top_urls_requests_generator.log'),
filemode='a',
)

Expand Down
5 changes: 4 additions & 1 deletion examples/top_urls/top_urls/top_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import logging
from operator import itemgetter
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand Down Expand Up @@ -36,7 +38,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/top_urls_top_global.log',
filename=os.path.join(tempfile.gettempdir(),
'top_urls_top_global.log'),
filemode='a',
)

Expand Down
5 changes: 4 additions & 1 deletion examples/top_urls/top_urls/top_intermediate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import logging
from operator import itemgetter
import time
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand Down Expand Up @@ -64,7 +66,8 @@ def calculate_top_N(self):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/top_urls_top_intermediate.log',
filename=os.path.join(tempfile.gettempdir(),
'top_urls_top_intermediate.log'),
filemode='a',
)

Expand Down
5 changes: 4 additions & 1 deletion examples/word_count/word_count/count_words.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from collections import defaultdict
from collections import namedtuple
import logging
import os
import tempfile

from pyleus.storm import SimpleBolt

Expand All @@ -26,7 +28,8 @@ def process_tuple(self, tup):
if __name__ == '__main__':
logging.basicConfig(
level=logging.DEBUG,
filename='/tmp/word_count_count_words.log',
filename=os.path.join(tempfile.gettempdir(),
'word_count_count_words.log'),
format="%(message)s",
filemode='a',
)
Expand Down
Loading