fix pip cli finally?
This commit is contained in:
parent
357d20d99e
commit
3b6c51200d
6
bin/librefi
Executable file
6
bin/librefi
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import librefi
|
||||
|
||||
if __name__ == '__main__':
|
||||
librefi.main()
|
|
@ -27,5 +27,4 @@ def main(argv=None):
|
|||
__all__ = [
|
||||
'LibreFi',
|
||||
'main',
|
||||
'_real_main',
|
||||
]
|
||||
|
|
23
setup.py
23
setup.py
|
@ -6,7 +6,13 @@ import os
|
|||
import sys
|
||||
from shutil import rmtree
|
||||
|
||||
from setuptools import find_packages, setup, Command
|
||||
try:
|
||||
from setuptools import setup, Command
|
||||
setuptools_available = True
|
||||
except ImportError:
|
||||
from distutils.core import setup, Command
|
||||
setuptools_available = False
|
||||
|
||||
|
||||
NAME = 'librefi'
|
||||
DESCRIPTION = 'LibreFi logs into public Wi-Fis without user interaction. Just access the network!'
|
||||
|
@ -35,6 +41,12 @@ try:
|
|||
except FileNotFoundError:
|
||||
long_description = DESCRIPTION
|
||||
|
||||
params = {}
|
||||
if setuptools_available:
|
||||
params['entry_points'] = {'console_scripts': ['librefi = librefi:main']}
|
||||
else:
|
||||
params['scripts'] = ['bin/librefi']
|
||||
|
||||
|
||||
class UploadCommand(Command):
|
||||
"""Support setup.py upload."""
|
||||
|
@ -84,10 +96,12 @@ setup(
|
|||
author_email=EMAIL,
|
||||
python_requires=REQUIRES_PYTHON,
|
||||
url=URL,
|
||||
packages=[
|
||||
'librefi',
|
||||
'librefi.connectors',
|
||||
'librefi.fxckers',
|
||||
],
|
||||
py_modules=['librefi'],
|
||||
entry_points={
|
||||
'console_scripts': ['librefi=librefi:main'],
|
||||
},
|
||||
install_requires=REQUIRED,
|
||||
extras_require=EXTRAS,
|
||||
include_package_data=True,
|
||||
|
@ -112,4 +126,5 @@ setup(
|
|||
cmdclass={
|
||||
'upload': UploadCommand,
|
||||
},
|
||||
**params,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue