mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-23 22:15:43 +08:00
Reformat files with black
This commit is contained in:
parent
cf9d9cd218
commit
f1f3004171
2 changed files with 8 additions and 12 deletions
|
@ -14,4 +14,3 @@ del sys.path[0]
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
19
setup.py
19
setup.py
|
@ -76,6 +76,7 @@ def parse_requirements(filename):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# With this, we can enforce a binary package.
|
# With this, we can enforce a binary package.
|
||||||
class BinaryDistribution(setuptools.Distribution):
|
class BinaryDistribution(setuptools.Distribution):
|
||||||
"""Distribution which always forces a binary package with platform name"""
|
"""Distribution which always forces a binary package with platform name"""
|
||||||
|
@ -86,26 +87,22 @@ class BinaryDistribution(setuptools.Distribution):
|
||||||
|
|
||||||
|
|
||||||
package_path = os.path.abspath(PACKAGE_NAME)
|
package_path = os.path.abspath(PACKAGE_NAME)
|
||||||
for path in ['__main__.py', PACKAGE_NAME + '.py']:
|
for path in ["__main__.py", PACKAGE_NAME + ".py"]:
|
||||||
package_file = os.path.join(package_path, "__main__.py")
|
package_file = os.path.join(package_path, "__main__.py")
|
||||||
if os.path.isfile(package_file):
|
if os.path.isfile(package_file):
|
||||||
break
|
break
|
||||||
metadata = get_metadata(package_file)
|
metadata = get_metadata(package_file)
|
||||||
requirements = parse_requirements(os.path.join(package_path, "requirements.txt"))
|
requirements = parse_requirements(os.path.join(package_path, "requirements.txt"))
|
||||||
long_description = _read_file("README.md")
|
long_description = _read_file("README.md")
|
||||||
|
|
||||||
package_data = {
|
package_data = {"": ["translations/*.yml"]}
|
||||||
'': ['translations/*.yml']
|
|
||||||
}
|
|
||||||
|
|
||||||
#if os.name == "nt":
|
# if os.name == "nt":
|
||||||
scripts = ["misc/npbackup.cmd"]
|
scripts = ["misc/npbackup.cmd"]
|
||||||
# console_scripts = []
|
# console_scripts = []
|
||||||
#else:
|
# else:
|
||||||
# scripts = []
|
# scripts = []
|
||||||
console_scripts = [
|
console_scripts = ["npbackup = npbackup.__main__:main"]
|
||||||
"npbackup = npbackup.__main__:main"
|
|
||||||
]
|
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name=PACKAGE_NAME,
|
name=PACKAGE_NAME,
|
||||||
|
@ -166,5 +163,5 @@ setuptools.setup(
|
||||||
},
|
},
|
||||||
# As we do version specific hacks for installed inline copies, make the
|
# As we do version specific hacks for installed inline copies, make the
|
||||||
# wheel version and platform specific.
|
# wheel version and platform specific.
|
||||||
#distclass=BinaryDistribution,
|
# distclass=BinaryDistribution,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue