Skip to content

Commit

Permalink
Merge pull request #1 from sumeshi/feature/uv
Browse files Browse the repository at this point in the history
Feature/uv
  • Loading branch information
sumeshi authored Nov 4, 2024
2 parents 1117446 + b98a030 commit 598dc6b
Show file tree
Hide file tree
Showing 14 changed files with 278 additions and 434 deletions.
16 changes: 14 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ RUN apt -y update && apt upgrade -qqy && apt -y install \
fish \
patchelf

RUN chsh -s /usr/bin/fish
ARG USERNAME=dev
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN pip install -U pip && pip install poetry
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

RUN chsh -s /usr/bin/fish $USERNAME

USER $USERNAME
RUN pip install -U pip && pip install uv
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "dev",
"dockerFile": "Dockerfile",
"remoteUser": "dev",
"postCreateCommand": "/usr/bin/fish ./.devcontainer/postCreateCommands.fish",
"customizations": {
"vscode": {
Expand Down
3 changes: 1 addition & 2 deletions .devcontainer/postCreateCommands.fish
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/usr/bin/fish
poetry config virtualenvs.in-project true
poetry install
echo 'set -x PATH $PATH $HOME/.local/bin' >> $HOME/.config/fish/config.fish
6 changes: 3 additions & 3 deletions .github/workflows/publish-binary-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
pip install uv
- name: Build and publish
run: |
poetry config pypi-token.pypi ${{secrets.PYPI_TOKEN}}
poetry publish --build
uv build
uv publish --token ${{secrets.PYPI_TOKEN}}
19 changes: 8 additions & 11 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@ jobs:

- name: Install dependencies
run: |
pip install poetry
poetry config virtualenvs.in-project true
poetry install
pip install uv
- name: build
run: |
pip install nuitka
poetry run python -m nuitka --standalone --onefile --follow-imports -o sscsv.exe --output-dir=dist --assume-yes-for-downloads src/sscsv/run.py
uv run python -m nuitka --standalone --onefile --follow-imports -o qsv.exe --output-dir=dist --assume-yes-for-downloads src/qsv/__init__.py
- name: verify
run: |
dist/sscsv.exe -h
dist/qsv.exe -h
- name: create tag
id: create_tag
Expand All @@ -53,7 +51,7 @@ jobs:
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.create_tag.outputs.version }}
files: dist/sscsv.exe
files: dist/qsv.exe
name: Release ${{ steps.create_tag.outputs.version }}
body: 'This release was automatically created by GitHub Actions.'
env:
Expand All @@ -77,22 +75,21 @@ jobs:
- name: Install dependencies
run: |
sudo apt install patchelf
pip install poetry
poetry install
pip install uv
- name: build
run: |
pip install nuitka
poetry run python -m nuitka --standalone --onefile --follow-imports -o sscsv --output-dir=dist --assume-yes-for-downloads src/sscsv/run.py
uv run python -m nuitka --standalone --onefile --follow-imports -o qsv --output-dir=dist --assume-yes-for-downloads src/qsv/__init__.py
- name: verify
run: |
dist/sscsv -h
dist/qsv -h
- name: upload asset to release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.build-windows.outputs.version }}
files: dist/sscsv
files: dist/qsv
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 598dc6b

Please sign in to comment.