Fix the issue that is unable to import libs if installing by pip
This commit is contained in:
parent
5dab21b847
commit
d8e961126a
@ -4,8 +4,10 @@ import sys
|
|||||||
|
|
||||||
class Settings(object):
|
class Settings(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
# Be default, the home will be in the same folder as labelImg
|
||||||
|
home = os.path.expanduser("~")
|
||||||
self.data = {}
|
self.data = {}
|
||||||
self.path = os.path.join(os.path.dirname(sys.argv[0]), '.settings.pkl')
|
self.path = os.path.join(home, '.settings.pkl')
|
||||||
|
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
self.data[key] = value
|
self.data[key] = value
|
||||||
|
|||||||
21
setup.py
21
setup.py
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
with open('README.rst') as readme_file:
|
with open('README.rst') as readme_file:
|
||||||
readme = readme_file.read()
|
readme = readme_file.read()
|
||||||
@ -10,13 +10,7 @@ with open('HISTORY.rst') as history_file:
|
|||||||
history = history_file.read()
|
history = history_file.read()
|
||||||
|
|
||||||
requirements = [
|
requirements = [
|
||||||
# TODO: put package requirements here
|
# TODO: Different OS have different requirements
|
||||||
]
|
|
||||||
|
|
||||||
test_requirements = [
|
|
||||||
'qt',
|
|
||||||
'qt4',
|
|
||||||
'libxml2'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
@ -27,10 +21,7 @@ setup(
|
|||||||
author="TzuTa Lin",
|
author="TzuTa Lin",
|
||||||
author_email='tzu.ta.lin@gmail.com',
|
author_email='tzu.ta.lin@gmail.com',
|
||||||
url='https://github.com/tzutalin/labelImg',
|
url='https://github.com/tzutalin/labelImg',
|
||||||
packages=[
|
packages=find_packages(),
|
||||||
'labelImg', 'labelImg.libs'
|
|
||||||
],
|
|
||||||
package_dir={'labelImg': '.'},
|
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'labelImg=labelImg.labelImg:main'
|
'labelImg=labelImg.labelImg:main'
|
||||||
@ -40,9 +31,9 @@ setup(
|
|||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
license="MIT license",
|
license="MIT license",
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
keywords='labelImg',
|
keywords='labelImg labelTool development annotation deeplearning',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 2 - Pre-Alpha',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'License :: OSI Approved :: MIT License',
|
'License :: OSI Approved :: MIT License',
|
||||||
'Natural Language :: English',
|
'Natural Language :: English',
|
||||||
@ -55,6 +46,4 @@ setup(
|
|||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
],
|
],
|
||||||
test_suite='tests',
|
|
||||||
tests_require=test_requirements
|
|
||||||
)
|
)
|
||||||
Loading…
x
Reference in New Issue
Block a user