Skip to content

Commit fee8020

Browse files
author
Juan Carlos
committed
Fix #38
1 parent a4dfc42 commit fee8020

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
css-html-js-minify.py

setup.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,40 +28,40 @@
2828

2929
import os
3030

31-
from setuptools import setup, Command
31+
from pathlib import Path
32+
from shutil import copytree, which
3233
from tempfile import TemporaryDirectory
33-
from shutil import copytree
3434
from zipapp import create_archive
3535

36+
from setuptools import Command, setup
37+
3638

3739
##############################################################################
3840
# Dont touch below
3941

4042

4143
class ZipApp(Command):
42-
description, user_options = "Creates a zipapp.", []
44+
description, user_options = "Creates a ZipApp.", []
4345

4446
def initialize_options(self): pass # Dont needed, but required.
4547

4648
def finalize_options(self): pass # Dont needed, but required.
4749

4850
def run(self):
4951
with TemporaryDirectory() as tmpdir:
50-
copytree('.', os.path.join(tmpdir, 'css-html-js-minify'))
51-
fyle = os.path.join(tmpdir, '__main__.py')
52-
with open(fyle, 'w', encoding='utf-8') as entry:
53-
entry.write("import runpy\nrunpy.run_module('css-html-js-minify')")
54-
create_archive(tmpdir, 'css-html-js-minify.pyz', '/usr/bin/env python3', "css-html-js-minify")
52+
copytree('.', Path(tmpdir) / 'css-html-js-minify')
53+
(Path(tmpdir) / '__main__.py').write_text("import runpy\nrunpy.run_module('css-html-js-minify')")
54+
create_archive(tmpdir, 'css-html-js-minify.pyz', which('python3'))
5555

5656

5757
##############################################################################
5858

5959

6060
setup(
61-
install_requires=['anglerfish'],
61+
install_requires=['anglerfish'],css-html-js-minify.py
6262
setup_requires=['anglerfish'],
6363
tests_require=['anglerfish'],
64-
requires=['anglerfish'],
64+
requires=['anglerfish'],css-html-js-minify.py
6565

6666
# scripts=['css-html-js-minify.py'], # uncomment if want install as script
6767

0 commit comments

Comments
 (0)