Minor enhancements
Get rid of NonfatalException (an exception is nonfatal iff it is catched somewhere) Foreport fixes for #26 and #30. The current __sersion__ string is now kept in instaloader.py rather than setup.py. This lets instaloader.__version__ always deliver the version of the actually-loaded Instaloader module. Minor changes to README.rst, error handling and which class methods are public. With these and the changes of the previous commit, we saved 31 lines of code, indicating that it might be easier to understand and to maintain.
This commit is contained in:
13
setup.py
13
setup.py
@@ -1,14 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
import sys
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
def get_version():
|
||||
with open('instaloader.py') as f:
|
||||
for line in f:
|
||||
m = re.match("__version__ = '(.*)'", line)
|
||||
if m:
|
||||
return m.group(1)
|
||||
raise SystemExit("Could not find version string.")
|
||||
|
||||
|
||||
if sys.version_info < (3, 5):
|
||||
sys.exit('Instaloader requires Python >= 3.5.')
|
||||
|
||||
setup(
|
||||
name='instaloader',
|
||||
version='2.2.2',
|
||||
version=get_version(),
|
||||
py_modules=['instaloader'],
|
||||
url='https://github.com/Thammus/instaloader',
|
||||
license='MIT',
|
||||
|
Reference in New Issue
Block a user