Skip to content

Commit bcc1729

Browse files
Initial changes to be able to use in currrent env.
1 parent 66688d7 commit bcc1729

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

setup.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
from setuptools import setup, find_packages
44
import subprocess
5+
import shutil
6+
import os
7+
8+
if os.path.isdir('build'):
9+
shutil.rmtree('build')
510

611
setup(name="singer-python",
712
version='5.12.1',
@@ -14,8 +19,7 @@
1419
'jsonschema==2.6.0',
1520
'simplejson==3.11.1',
1621
'python-dateutil>=2.6.0',
17-
'backoff==1.8.0',
18-
'ciso8601',
22+
'backoff==1.8.0'
1923
],
2024
extras_require={
2125
'dev': [
@@ -33,3 +37,8 @@
3337
]
3438
},
3539
)
40+
41+
# clean-up
42+
if os.path.isdir('build'):
43+
shutil.rmtree('build')
44+
shutil.rmtree('singer_python.egg-info')

singer/messages.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
import pytz
44
import simplejson as json
5-
import ciso8601
5+
#Remove this one because it is not native Python lib so it makes deployment complicated.
6+
#import ciso8601
67

78
import singer.utils as u
89
from .logger import get_logger
@@ -187,12 +188,14 @@ def parse_message(msg):
187188

188189
if msg_type == 'RECORD':
189190
time_extracted = obj.get('time_extracted')
190-
if time_extracted:
191-
try:
192-
time_extracted = ciso8601.parse_datetime(time_extracted)
193-
except:
194-
LOGGER.warning("unable to parse time_extracted with ciso8601 library")
195-
time_extracted = None
191+
# ciso8601 is not python library. this makes complicated deployment on AWS Glue
192+
# comment out this part
193+
# if time_extracted:
194+
# try:
195+
# time_extracted = ciso8601.parse_datetime(time_extracted)
196+
# except:
197+
# LOGGER.warning("unable to parse time_extracted with ciso8601 library")
198+
# time_extracted = None
196199

197200

198201
# time_extracted = dateutil.parser.parse(time_extracted)

0 commit comments

Comments
 (0)