File tree 5 files changed +75
-2
lines changed
5 files changed +75
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to PyPI
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ build-n-publish :
10
+ name : Build and Publish Package
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ - name : Set up Python 3
15
+ uses : actions/setup-python@v2
16
+ with :
17
+ python-version : " 3.x"
18
+ - name : Upgrade setuptools and wheel
19
+ run : python -m pip install --user --upgrade setuptools wheel
20
+ - name : Build a binary wheel and a source tarball
21
+ run : python setup.py sdist bdist_wheel
22
+ - name : Publish package to PyPI
23
+ uses : pypa/gh-action-pypi-publish@release/v1
24
+ with :
25
+ password : ${{ secrets.PYPI_PASSWORD }}
Original file line number Diff line number Diff line change
1
+ __VERSION__ = "0.1.0b1"
Original file line number Diff line number Diff line change 3
3
import argparse
4
4
import gzip
5
5
import sys
6
+ import os
6
7
7
- from mementomap .mementomap import compact , generate , lookup
8
+ if not __package__ :
9
+ sys .path .insert (1 , os .path .dirname (os .path .dirname (os .path .realpath (__file__ ))))
10
+
11
+ from mementomap import __VERSION__
12
+ from mementomap .cli import compact , generate , lookup
8
13
9
14
10
15
def run_generate (** kw ):
@@ -60,7 +65,7 @@ def run_batchlookup(**kw):
60
65
mobj .close ()
61
66
62
67
63
- if __name__ == "__main__" :
68
+ def main () :
64
69
parser = argparse .ArgumentParser ()
65
70
subparsers = parser .add_subparsers ()
66
71
@@ -105,3 +110,7 @@ def run_batchlookup(**kw):
105
110
args .func (** vars (args ))
106
111
except Exception as e :
107
112
parser .print_help ()
113
+
114
+
115
+ if __name__ == "__main__" :
116
+ main ()
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ import setuptools
2
+
3
+ from mementomap import __VERSION__
4
+
5
+ with open ("README.md" , "r" ) as fh :
6
+ long_description = fh .read ()
7
+
8
+ setuptools .setup (
9
+ name = "mementomap" ,
10
+ version = __VERSION__ ,
11
+ author = "Sawood Alam" ,
12
+
13
+ description = "A Tool to Summarize Web Archive Holdings" ,
14
+ long_description = long_description ,
15
+ long_description_content_type = "text/markdown" ,
16
+ url = "https://github.com/oduwsdl/MementoMap" ,
17
+ license = "MIT License" ,
18
+ packages = setuptools .find_packages (),
19
+ provides = [
20
+ "mementomap"
21
+ ],
22
+ classifiers = [
23
+ "Programming Language :: Python :: 3" ,
24
+ "License :: OSI Approved :: MIT License" ,
25
+ "Operating System :: OS Independent" ,
26
+ "Environment :: Console" ,
27
+ "Topic :: Internet" ,
28
+ "Topic :: Internet :: WWW/HTTP" ,
29
+ "Topic :: Internet :: WWW/HTTP :: Indexing/Search" ,
30
+ "Development Status :: 4 - Beta"
31
+ ],
32
+ python_requires = '>=3.6' ,
33
+ entry_points = {
34
+ "console_scripts" : [
35
+ "mementomap = mementomap.__main__:main"
36
+ ]
37
+ }
38
+ )
You can’t perform that action at this time.
0 commit comments