Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-lister
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine R. Dumont
swh-lister
Commits
3efd0e33
Commit
3efd0e33
authored
7 years ago
by
Nicolas Dandrimont
Browse files
Options
Downloads
Patches
Plain Diff
lister_transports: load version by using vcversioner's export module
parent
83ebb957
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
setup.py
+1
-1
1 addition, 1 deletion
setup.py
swh/lister/core/lister_transports.py
+6
-2
6 additions, 2 deletions
swh/lister/core/lister_transports.py
with
8 additions
and
3 deletions
.gitignore
+
1
−
0
View file @
3efd0e33
...
...
@@ -7,3 +7,4 @@ __pycache__
dist
*.egg-info
version.txt
swh/lister/_version.py
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
3efd0e33
...
...
@@ -25,6 +25,6 @@ setup(
scripts
=
[
'
bin/ghlister
'
],
install_requires
=
parse_requirements
(),
setup_requires
=
[
'
vcversioner
'
],
vcversioner
=
{},
vcversioner
=
{
'
version_module_paths
'
:
[
'
swh/lister/_version.py
'
]
},
include_package_data
=
True
,
)
This diff is collapsed.
Click to expand it.
swh/lister/core/lister_transports.py
+
6
−
2
View file @
3efd0e33
...
...
@@ -9,9 +9,13 @@ from email.utils import parsedate
from
pprint
import
pformat
import
requests
import
vcversioner
import
xmltodict
try
:
from
swh.lister._version
import
__version__
except
ImportError
:
__version__
=
'
devel
'
from
.abstractattribute
import
AbstractAttribute
from
.lister_base
import
FetchError
...
...
@@ -92,7 +96,7 @@ class SWHListerHttpTransport(abc.ABC):
raise
NameError
(
'
HTTP Lister Transport requires api_baseurl.
'
)
self
.
api_baseurl
=
api_baseurl
# eg. 'https://api.github.com'
self
.
session
=
requests
.
Session
()
self
.
lister_version
=
vc
version
er
.
find_version
().
version
self
.
lister_version
=
__
version
__
def
transport_request
(
self
,
identifier
):
"""
Implements SWHListerBase.transport_request for HTTP using Requests.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment