Skip to content

Commit

Permalink
ensure that rc file is built before sdist
Browse files Browse the repository at this point in the history
  • Loading branch information
rfletchr committed Nov 22, 2023
1 parent 595a871 commit 9a0fcf5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@

![alt text](img/browser.jpg)

Cocktail is a standalone browser for Stable Diffusion models, designed with the goal of making managing your models easy.
Cocktail is a standalone browser for Stable Diffusion models, designed with the goal of making managing your models easy and fast.
<br> <br>

## Installing
### Binary Releases

Download the latest [release](https://github.com/cocktail-collective/cocktail/releases/latest)


or install in a virual environment.

``` bash
pip install git+https://github.com/cocktail-collective/cocktail.git
cocktail
```

## Features

### 🚀 Fast Search
Expand Down
26 changes: 26 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
import shutil
import subprocess
from setuptools import setup, find_namespace_packages

import setuptools.command.sdist
import setuptools.command.develop


class SDist(setuptools.command.sdist.sdist):
"""
Generate resources_rc.py before building the source distribution.
"""

def run(self):
pyside6_rcc = shutil.which("pyside6-rcc")
subprocess.check_call(
[
pyside6_rcc,
"-o",
"src/cocktail/resources/resources_rc.py",
"resources/resources.qrc",
]
)
setuptools.command.sdist.sdist.run(self)


setup(
name="cocktail",
Expand All @@ -21,4 +44,7 @@
"dev": ["pre-commit", "black", "pyinstaller"],
"dist": ["pyinstaller"],
},
cmdclass={
"sdist": SDist,
},
)
1 change: 0 additions & 1 deletion src/cocktail/ui/startup/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def extract(self, reply: QtNetwork.QNetworkReply, destination: str):
with zip_file.open(info) as file, open(
os.path.join(destination, info.filename), "wb"
) as output_file:

while True:
chunk = file.read(self.CHUNK_SIZE)
if not chunk:
Expand Down

0 comments on commit 9a0fcf5

Please sign in to comment.