File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
1
import io
2
2
import os
3
+
3
4
from distutils .file_util import copy_file
4
5
from setuptools import setup
5
6
6
-
7
7
dir_path = os .path .abspath (os .path .dirname (__file__ ))
8
- with io .open (os .path .join (dir_path , 'README.rst' ), encoding = 'utf-8' ) as readme_file :
8
+ readme_path = os .path .join (dir_path , 'README.rst' )
9
+ version_path = os .path .join (dir_path , 'VERSION.txt' )
10
+
11
+ with io .open (readme_path , encoding = 'utf-8' ) as readme_file :
9
12
readme = readme_file .read ()
10
- with io .open (os . path . join ( dir_path , 'VERSION.txt' ) , encoding = 'utf-8' ) as version_file :
13
+ with io .open (version_path , encoding = 'utf-8' ) as version_file :
11
14
version = version_file .read ().strip ()
15
+
12
16
base_url = 'https://github.com/sendgrid/'
13
17
14
- copy_file (os . path . join ( dir_path , 'VERSION.txt' ) ,
18
+ copy_file (version_path ,
15
19
os .path .join (dir_path , 'python_http_client' , 'VERSION.txt' ),
16
20
verbose = 0 )
17
21
Original file line number Diff line number Diff line change @@ -9,14 +9,11 @@ def setUp(self):
9
9
self .openlicensefile = os .path .join (
10
10
os .path .dirname (__file__ ),
11
11
'../LICENSE.md' )
12
- self .pattern = 'Copyright (c ) %s Twilio SendGrid, Inc.' % (
12
+ self .pattern = 'Copyright (C ) %s, Twilio SendGrid, Inc.' % (
13
13
time .strftime ("%Y" ))
14
14
fh = open (self .openlicensefile )
15
- self .licensefile = fh .read ()
15
+ self .license_file = fh .read ()
16
16
fh .close ()
17
17
18
18
def test__daterange (self ):
19
- try :
20
- self .assertIn (self .pattern , self .licensefile )
21
- except AssertionError :
22
- warnings .warn ("License file does not contain a current year!" )
19
+ self .assertIn (self .pattern , self .license_file )
You can’t perform that action at this time.
0 commit comments