-
Notifications
You must be signed in to change notification settings - Fork 150
fix python packaging using latest methods #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hsbasu
wants to merge
1
commit into
WoeUSB:master
Choose a base branch
from
hsbasu:fix-pythonize
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
\.idea/ | ||
doc/_build | ||
venv/ | ||
WoeUSB_ng\.egg-info/ | ||
*.egg-info* | ||
dist/ | ||
|
||
build/ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
graft WoeUSB/data | ||
graft WoeUSB/locale | ||
graft src/WoeUSB/data* | ||
graft src/WoeUSB/locale* | ||
graft miscellaneous | ||
include README.md | ||
include WoeUSB/woeusbgui |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
#!/usr/bin/env xdg-open | ||
[Desktop Entry] | ||
Name=WoeUSB-ng | ||
Comment=Create your own usb stick windows installer from an iso image or a real DVD. | ||
Exec=woeusbgui | ||
Icon=/usr/share/icons/WoeUSB-ng/icon.ico | ||
Icon=woeusb-logo | ||
Terminal=false | ||
Type=Application | ||
Categories=Utility; | ||
Encoding=UTF-8 | ||
Categories=Application;Utility; | ||
StartupNotify=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["setuptools>=42"] | ||
build-backend = "setuptools.build_meta" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[metadata] | ||
name = woeusb-ng | ||
version = 0.2.12 | ||
author = Jakub Szymański | ||
author_email = [email protected] | ||
description = WoeUSB-ng is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD. This is a rewrite of original WoeUSB. | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/WoeUSB/WoeUSB-ng | ||
project_urls = | ||
Bug Tracker = https://github.com/WoeUSB/WoeUSB-ng/issues | ||
classifiers = | ||
Development Status :: 5 - Production/Stable | ||
Environment :: X11 Applications :: GTK | ||
Intended Audience :: End Users/Desktop | ||
License :: OSI Approved | ||
:: GNU General Public License v3 or later (GPLv3+) | ||
Operating System :: POSIX | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.5 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3 :: Only | ||
Topic :: System :: Operating System | ||
|
||
[options] | ||
package_dir = | ||
= src | ||
packages = find: | ||
python_requires = >=3.6 | ||
include_package_data = True | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
[options.entry_points] | ||
gui_scripts = | ||
woeusbgui = WoeUSB.gui:run | ||
console_scripts = | ||
woeusb = WoeUSB.core:run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,13 @@ | ||
import os | ||
import shutil | ||
import stat | ||
|
||
from setuptools import setup | ||
from setuptools.command.develop import develop | ||
from setuptools.command.install import install | ||
|
||
this_directory = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
|
||
def post_install(): | ||
path = '/usr/local/bin/woeusbgui' # I give up, I have no clue how to get bin path that is used by pip | ||
shutil.copy2(this_directory + '/WoeUSB/woeusbgui', path) # I'll just hard code it until someone finds better way | ||
|
||
shutil.copy2(this_directory + '/miscellaneous/com.github.woeusb.woeusb-ng.policy', "/usr/share/polkit-1/actions") | ||
|
||
try: | ||
os.makedirs('/usr/share/icons/WoeUSB-ng') | ||
except FileExistsError: | ||
pass | ||
|
||
shutil.copy2(this_directory + '/WoeUSB/data/icon.ico', '/usr/share/icons/WoeUSB-ng/icon.ico') | ||
shutil.copy2(this_directory + '/miscellaneous/WoeUSB-ng.desktop', "/usr/share/applications/WoeUSB-ng.desktop") | ||
|
||
os.chmod('/usr/share/applications/WoeUSB-ng.desktop', | ||
stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IEXEC) # 755 | ||
|
||
|
||
class PostDevelopCommand(develop): | ||
"""Post-installation for development mode.""" | ||
|
||
def run(self): | ||
# TODO | ||
develop.run(self) | ||
|
||
|
||
class PostInstallCommand(install): | ||
"""Post-installation for installation mode.""" | ||
|
||
def run(self): | ||
post_install() | ||
install.run(self) | ||
|
||
|
||
setup( | ||
name='WoeUSB-ng', | ||
version='0.2.12', | ||
description='WoeUSB-ng is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD. This is a rewrite of original WoeUSB. ', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/WoeUSB/WoeUSB-ng', | ||
author='Jakub Szymański', | ||
author_email='[email protected]', | ||
license='GPL-3', | ||
zip_safe=False, | ||
packages=['WoeUSB'], | ||
include_package_data=True, | ||
scripts=[ | ||
'WoeUSB/woeusb', | ||
data_files=[ | ||
("share/applications", ["miscellaneous/WoeUSB-ng.desktop"]), | ||
("share/polkit-1/actions", ["miscellaneous/com.github.woeusb.woeusb-ng.policy"]), | ||
("share/icons/hicolor/scalable/apps", ["src/WoeUSB/data/woeusb-logo.png"]), | ||
], | ||
install_requires=[ | ||
'termcolor', | ||
'wxPython', | ||
], | ||
cmdclass={ | ||
'develop': PostDevelopCommand, | ||
'install': PostInstallCommand | ||
} | ||
] | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.