fosslight-util 1.4.41__tar.gz → 1.4.42__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/PKG-INFO +7 -2
  2. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/README.md +6 -1
  3. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/setup.py +1 -1
  4. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/download.py +23 -2
  5. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util.egg-info/PKG-INFO +7 -2
  6. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/LICENSE +0 -0
  7. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/MANIFEST.in +0 -0
  8. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/requirements.txt +0 -0
  9. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/setup.cfg +0 -0
  10. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/__init__.py +0 -0
  11. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/_get_downloadable_url.py +0 -0
  12. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/compare_yaml.py +0 -0
  13. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/constant.py +0 -0
  14. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/convert_excel_to_yaml.py +0 -0
  15. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/correct.py +0 -0
  16. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/cover.py +0 -0
  17. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/help.py +0 -0
  18. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/oss_item.py +0 -0
  19. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/output_format.py +0 -0
  20. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/parsing_yaml.py +0 -0
  21. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/read_excel.py +0 -0
  22. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/resources/frequentLicenselist.json +0 -0
  23. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/resources/frequent_license_nick_list.json +0 -0
  24. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/resources/licenses.json +0 -0
  25. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/set_log.py +0 -0
  26. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/spdx_licenses.py +0 -0
  27. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/timer_thread.py +0 -0
  28. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/write_excel.py +0 -0
  29. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/write_opossum.py +0 -0
  30. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/write_scancodejson.py +0 -0
  31. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/write_spdx.py +0 -0
  32. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/write_txt.py +0 -0
  33. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util/write_yaml.py +0 -0
  34. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util.egg-info/SOURCES.txt +0 -0
  35. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util.egg-info/dependency_links.txt +0 -0
  36. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util.egg-info/entry_points.txt +0 -0
  37. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util.egg-info/requires.txt +0 -0
  38. {fosslight_util-1.4.41 → fosslight_util-1.4.42}/src/fosslight_util.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fosslight_util
3
- Version: 1.4.41
3
+ Version: 1.4.42
4
4
  Summary: FOSSLight Util
5
5
  Home-page: https://github.com/fosslight/fosslight_util
6
6
  Author: LG Electronics
@@ -122,6 +122,7 @@ Description: <!--
122
122
 
123
123
  #### How it works
124
124
  1. Try git clone.
125
+ 1-1. If the link is ssh-url, convert to https-url.
125
126
  2. If git clone fails, download it with wget and extract the compressed file.
126
127
  3. After extracting the compressed file, delete the compressed file.
127
128
 
@@ -135,7 +136,11 @@ Description: <!--
135
136
 
136
137
  #### How to run
137
138
  ```
138
- $ fosslight_download -s "https://github.com/LGE-OSS/example" -t target_dir/
139
+ $ fosslight_download -s "https://github.com/LGE-OSS/example" -t target_dir/
140
+ ```
141
+ If you want to try with private repository, set your github token like below.
142
+ ```
143
+ $ fosslight_download -s "https://my_github_token@github.com/Foo/private_repo -t target_dir/"
139
144
  ```
140
145
 
141
146
  ## 👏 How to report issue
@@ -114,6 +114,7 @@ If you give a link, the source is downloaded to the target directory through git
114
114
 
115
115
  #### How it works
116
116
  1. Try git clone.
117
+ 1-1. If the link is ssh-url, convert to https-url.
117
118
  2. If git clone fails, download it with wget and extract the compressed file.
118
119
  3. After extracting the compressed file, delete the compressed file.
119
120
 
@@ -127,7 +128,11 @@ If you give a link, the source is downloaded to the target directory through git
127
128
 
128
129
  #### How to run
129
130
  ```
130
- $ fosslight_download -s "https://github.com/LGE-OSS/example" -t target_dir/
131
+ $ fosslight_download -s "https://github.com/LGE-OSS/example" -t target_dir/
132
+ ```
133
+ If you want to try with private repository, set your github token like below.
134
+ ```
135
+ $ fosslight_download -s "https://my_github_token@github.com/Foo/private_repo -t target_dir/"
131
136
  ```
132
137
 
133
138
  ## 👏 How to report issue
@@ -14,7 +14,7 @@ with open('requirements.txt', 'r', 'utf-8') as f:
14
14
  if __name__ == "__main__":
15
15
  setup(
16
16
  name='fosslight_util',
17
- version='1.4.41',
17
+ version='1.4.42',
18
18
  package_dir={"": "src"},
19
19
  packages=find_packages(where='src'),
20
20
  description='FOSSLight Util',
@@ -61,13 +61,21 @@ def change_src_link_to_https(src_link):
61
61
  return src_link
62
62
 
63
63
 
64
+ def change_ssh_link_to_https(src_link):
65
+ src_link = src_link.replace("git@github.com:", "https://github.com/")
66
+ return src_link
67
+
68
+
64
69
  def parse_src_link(src_link):
65
70
  src_info = {"url": src_link}
66
71
  src_link_changed = ""
67
- if src_link.startswith("git://") or src_link.startswith("https://") or src_link.startswith("http://"):
72
+ if src_link.startswith("git://") or src_link.startswith("git@") \
73
+ or src_link.startswith("https://") or src_link.startswith("http://"):
68
74
  src_link_split = src_link.split(';')
69
75
  if src_link.startswith("git://github.com/"):
70
76
  src_link_changed = change_src_link_to_https(src_link_split[0])
77
+ elif src_link.startswith("git@github.com:"):
78
+ src_link_changed = change_ssh_link_to_https(src_link_split[0])
71
79
  else:
72
80
  if "rubygems.org" in src_link:
73
81
  src_info["rubygems"] = True
@@ -205,11 +213,24 @@ def get_github_ossname(link):
205
213
  return oss_name
206
214
 
207
215
 
216
+ def get_github_token(git_url):
217
+ github_token = ""
218
+ pattern = r'https://(.*?)@'
219
+ search = re.search(pattern, git_url)
220
+ if search:
221
+ github_token = search.group(1)
222
+ return github_token
223
+
224
+
208
225
  def download_git_clone(git_url, target_dir, checkout_to="", tag="", branch=""):
209
226
  ref_to_checkout = decide_checkout(checkout_to, tag, branch)
210
227
  msg = ""
211
228
  oss_name = get_github_ossname(git_url)
212
229
  oss_version = ""
230
+ github_token = get_github_token(git_url)
231
+ callbacks = None
232
+ if github_token != "":
233
+ callbacks = git.RemoteCallbacks(credentials=git.UserPass("foo", github_token)) # username is not used, so set to dummy
213
234
 
214
235
  if platform.system() != "Windows":
215
236
  signal.signal(signal.SIGALRM, alarm_handler)
@@ -221,7 +242,7 @@ def download_git_clone(git_url, target_dir, checkout_to="", tag="", branch=""):
221
242
  Path(target_dir).mkdir(parents=True, exist_ok=True)
222
243
  repo = git.clone_repository(git_url, target_dir,
223
244
  bare=False, repository=None,
224
- remote=None, callbacks=None)
245
+ remote=None, callbacks=callbacks)
225
246
  if platform.system() != "Windows":
226
247
  signal.alarm(0)
227
248
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fosslight-util
3
- Version: 1.4.41
3
+ Version: 1.4.42
4
4
  Summary: FOSSLight Util
5
5
  Home-page: https://github.com/fosslight/fosslight_util
6
6
  Author: LG Electronics
@@ -122,6 +122,7 @@ Description: <!--
122
122
 
123
123
  #### How it works
124
124
  1. Try git clone.
125
+ 1-1. If the link is ssh-url, convert to https-url.
125
126
  2. If git clone fails, download it with wget and extract the compressed file.
126
127
  3. After extracting the compressed file, delete the compressed file.
127
128
 
@@ -135,7 +136,11 @@ Description: <!--
135
136
 
136
137
  #### How to run
137
138
  ```
138
- $ fosslight_download -s "https://github.com/LGE-OSS/example" -t target_dir/
139
+ $ fosslight_download -s "https://github.com/LGE-OSS/example" -t target_dir/
140
+ ```
141
+ If you want to try with private repository, set your github token like below.
142
+ ```
143
+ $ fosslight_download -s "https://my_github_token@github.com/Foo/private_repo -t target_dir/"
139
144
  ```
140
145
 
141
146
  ## 👏 How to report issue
File without changes