@@ -16,11 +16,10 @@ def get_version(*file_paths):
16
16
"""
17
17
filename = os .path .join (os .path .dirname (__file__ ), * file_paths )
18
18
version_file = open (filename ).read ()
19
- version_match = re .search (r"^__version__ = ['\"]([^'\"]*)['\"]" ,
20
- version_file , re .M )
19
+ version_match = re .search (r"^__version__ = ['\"]([^'\"]*)['\"]" , version_file , re .M )
21
20
if version_match :
22
21
return version_match .group (1 )
23
- raise RuntimeError (' Unable to find version string.' )
22
+ raise RuntimeError (" Unable to find version string." )
24
23
25
24
26
25
def load_requirements (* requirements_paths ):
@@ -33,7 +32,8 @@ def load_requirements(*requirements_paths):
33
32
requirements = set ()
34
33
for path in requirements_paths :
35
34
requirements .update (
36
- line .split ('#' )[0 ].strip () for line in open (path ).readlines ()
35
+ line .split ("#" )[0 ].strip ()
36
+ for line in open (path ).readlines ()
37
37
if is_requirement (line .strip ())
38
38
)
39
39
return list (requirements )
@@ -47,64 +47,65 @@ def is_requirement(line):
47
47
bool: True if the line is not blank, a comment, a URL, or an included file
48
48
"""
49
49
return not (
50
- line == '' or
51
- line .startswith ('-r' ) or
52
- line .startswith ('#' ) or
53
- line .startswith ('-e' ) or
54
- line .startswith (' git+' ) or
55
- line .startswith ('-c' )
50
+ line == ""
51
+ or line .startswith ("-r" )
52
+ or line .startswith ("#" )
53
+ or line .startswith ("-e" )
54
+ or line .startswith (" git+" )
55
+ or line .startswith ("-c" )
56
56
)
57
57
58
58
59
- VERSION = get_version (' code_annotations' , ' __init__.py' )
59
+ VERSION = get_version (" code_annotations" , " __init__.py" )
60
60
61
- if sys .argv [- 1 ] == ' tag' :
61
+ if sys .argv [- 1 ] == " tag" :
62
62
print ("Tagging the version on github:" )
63
63
os .system ("git tag -a %s -m 'version %s'" % (VERSION , VERSION ))
64
64
os .system ("git push --tags" )
65
65
sys .exit ()
66
66
67
- README = open (os .path .join (os .path .dirname (__file__ ), ' README.rst' )).read ()
68
- CHANGELOG = open (os .path .join (os .path .dirname (__file__ ), ' CHANGELOG.rst' )).read ()
67
+ README = open (os .path .join (os .path .dirname (__file__ ), " README.rst" )).read ()
68
+ CHANGELOG = open (os .path .join (os .path .dirname (__file__ ), " CHANGELOG.rst" )).read ()
69
69
70
70
setup (
71
- name = ' code-annotations' ,
71
+ name = " code-annotations" ,
72
72
version = VERSION ,
73
73
description = """Extensible tools for parsing annotations in codebases""" ,
74
- long_description = README + ' \n \n ' + CHANGELOG ,
75
- long_description_content_type = ' text/x-rst' ,
76
- author = ' edX' ,
77
- author_email = ' oscm@edx.org' ,
78
- url = ' https://github.com/openedx/code-annotations' ,
74
+ long_description = README + " \n \n " + CHANGELOG ,
75
+ long_description_content_type = " text/x-rst" ,
76
+ author = " edX" ,
77
+ author_email = " oscm@edx.org" ,
78
+ url = " https://github.com/openedx/code-annotations" ,
79
79
packages = [
80
- ' code_annotations' ,
80
+ " code_annotations" ,
81
81
],
82
82
entry_points = {
83
- ' console_scripts' : [
84
- ' code_annotations = code_annotations.cli:entry_point' ,
83
+ " console_scripts" : [
84
+ " code_annotations = code_annotations.cli:entry_point" ,
85
85
],
86
- ' annotation_finder.searchers' : [
87
- ' javascript = code_annotations.extensions.javascript:JavascriptAnnotationExtension' ,
88
- ' python = code_annotations.extensions.python:PythonAnnotationExtension' ,
86
+ " annotation_finder.searchers" : [
87
+ " javascript = code_annotations.extensions.javascript:JavascriptAnnotationExtension" ,
88
+ " python = code_annotations.extensions.python:PythonAnnotationExtension" ,
89
89
],
90
90
},
91
91
include_package_data = True ,
92
- install_requires = load_requirements (' requirements/base.in' ),
92
+ install_requires = load_requirements (" requirements/base.in" ),
93
93
extras_require = {"django" : ["Django>=4.2" ]},
94
94
license = "Apache Software License 2.0" ,
95
95
zip_safe = False ,
96
- keywords = ' edx pii code annotations' ,
96
+ keywords = " edx pii code annotations" ,
97
97
python_requires = ">=3.11" ,
98
98
classifiers = [
99
- 'Development Status :: 3 - Alpha' ,
100
- 'Framework :: Django' ,
101
- 'Framework :: Django :: 4.2' ,
102
- 'Intended Audience :: Developers' ,
103
- 'License :: OSI Approved :: Apache Software License' ,
104
- 'Natural Language :: English' ,
105
- 'Programming Language :: Python' ,
106
- 'Programming Language :: Python :: 3' ,
107
- 'Programming Language :: Python :: 3.11' ,
108
- 'Programming Language :: Python :: 3.12' ,
99
+ "Development Status :: 3 - Alpha" ,
100
+ "Framework :: Django" ,
101
+ "Framework :: Django :: 4.2" ,
102
+ "Framework :: Django :: 5.2" ,
103
+ "Intended Audience :: Developers" ,
104
+ "License :: OSI Approved :: Apache Software License" ,
105
+ "Natural Language :: English" ,
106
+ "Programming Language :: Python" ,
107
+ "Programming Language :: Python :: 3" ,
108
+ "Programming Language :: Python :: 3.11" ,
109
+ "Programming Language :: Python :: 3.12" ,
109
110
],
110
111
)
0 commit comments