Skip to content

Commit

Permalink
Fix UTF-8 Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-wilson committed May 13, 2021
1 parent b27a974 commit 0eebeea
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language = "bash"
run = ""
6 changes: 3 additions & 3 deletions dist/homebrew/Sailboat.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Created with sailboat, the Python releaser

# v0.26.1
# v0.26.2

class Sailboat < Formula
include Language::Python::Virtualenv
Expand Down Expand Up @@ -30,8 +30,8 @@ class Sailboat < Formula
sha256 "27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804"
end
resource "setuptools" do
url "https://files.pythonhosted.org/packages/f6/e9/19af16328705915233299f6f1f02db95899fb00c75ac9da4757aa1e5d1de/setuptools-56.0.0.tar.gz"
sha256 "08a1c0f99455307c48690f00d5c2ac2c1ccfab04df00454fef854ec145b81302"
url "https://files.pythonhosted.org/packages/fc/0a/b486efab52f8ad03c3eca0c998dd3deafba0c39b29e0c49c68a7152c8b2d/setuptools-56.2.0.tar.gz"
sha256 "7bb5652625e94e73b9358b7ed8c6431b732e80cf31f4e0972294c64f0e5b849e"
end
resource "twine" do
url "https://files.pythonhosted.org/packages/ac/5c/e12811190a3560c85dfb4caea752635abea59c53390592493549d88f086a/twine-3.4.1.tar.gz"
Expand Down
Binary file removed dist/pypi/sailboat-0.26.1-py3-none-any.whl
Binary file not shown.
Binary file removed dist/pypi/sailboat-0.26.1.tar.gz
Binary file not shown.
Binary file added dist/pypi/sailboat-0.26.2-py3-none-any.whl
Binary file not shown.
Binary file added dist/pypi/sailboat-0.26.2.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion sailboat.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description = "Sailboat is a Python developer's best friend. It's a Python build
url = "https://github.com/cole-wilson/sailboat"
keywords = "sail package python setup.py sailboat shipsnake distribute ship snake snek release build"
license = "MIT"
latest_build = "0.26.1"
latest_build = "0.26.2"
author = "Cole Wilson"
latest_release = "0.26.0"
release-notes = "Update some stuff"
Expand Down
2 changes: 1 addition & 1 deletion sailboat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.26.1" # Added by Sailboat
__version__ = "0.26.2" # Added by Sailboat

import os
import glob
Expand Down
2 changes: 1 addition & 1 deletion sailboat/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(argv=()) -> None:
os.chdir(ordinal_path)
else:
needs_setup = False
with open('sailboat.toml', 'r') as file:
with open('sailboat.toml', 'r', encoding="utf8") as file:
data = toml.loads(file.read())
if data == {}:
needs_setup = True
Expand Down
6 changes: 3 additions & 3 deletions sailboat/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def run(self, **kwargs):
postbuild = progress_bar.add_subcounter('darkgrey')
# =====================================================================================
if not os.path.isfile('.gitignore'):
open('.' + os.sep + '.gitignore', 'w+').write(
open('.' + os.sep + '.gitignore', 'w+', encoding="utf8").write(
self.getResource('resources' + os.sep + 'gitignore.template').read().replace('/', os.sep))
source_dir = os.getcwd()
target_dir = self.data["short_name"] + os.sep
Expand All @@ -98,7 +98,7 @@ def run(self, **kwargs):
for filename in glob.glob(target_dir + os.sep + 'LICE*'):
shutil.copyfile(filename, 'LICENSE')
if not os.path.isfile(target_dir + '__init__.py'):
open(target_dir + '__init__.py', 'w+').write('# This file must exist, empty or not')
open(target_dir + '__init__.py', 'w+', encoding="utf8").write('# This file must exist, empty or not')
if self.data['resources']['file'] != "" and not os.path.isfile(
self.data['short_name'] + os.sep + '__main__.py') and os.path.isfile(self.data['resources']['file']):
try:
Expand All @@ -114,7 +114,7 @@ def run(self, **kwargs):
self.data['resources']['no_import'] = []
mods = []
for x in glob.glob(self.data['short_name'] + os.sep + '*.py'):
f = open(x)
f = open(x, encoding="utf8")
b = f.read()
f.close()
mods += re.findall('^import[ ]+(.*)', b, re.M)
Expand Down
4 changes: 2 additions & 2 deletions sailboat/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ def run(self, **kwargs):
dependencies=" ".join(self.data['resources']['modules'])
)
try:
f = open(f'.github{os.sep}workflows{os.sep}sailboat.yml', 'w+')
f = open(f'.github{os.sep}workflows{os.sep}sailboat.yml', 'w+', encoding="utf8")
except FileNotFoundError:
os.mkdir('.github')
os.mkdir(f'.github{os.sep}workflows')
f = open(f'.github{os.sep}workflows{os.sep}sailboat.yml', 'w+')
f = open(f'.github{os.sep}workflows{os.sep}sailboat.yml', 'w+', encoding="utf8")
f.write(new)
f.close()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

options = {
"name": "sailboat",
"version": "0.26.1",
"version": "0.26.2",
"scripts": [],
"entry_points": {'console_scripts': ['sail=sailboat.__main__:main', 'ssail=sailboat.__main__:main', 'sssail=sailboat.__main__:main', 'ssssail=sailboat.__main__:main', 'sailboat=sailboat.__main__:main', 'ssailboat=sailboat.__main__:main', 'sssailboat=sailboat.__main__:main', 'ssssailboat=sailboat.__main__:main'], 'sailboat_plugins': ['quickstart=sailboat.core:QuickStart', 'remove=sailboat.core:Remove', 'add=sailboat.core:Add', 'git=sailboat.core:Git', 'dev=sailboat.core:Develop', 'release=sailboat.core:Release', 'plugins=sailboat.core:ManagePlugins', 'wizard=sailboat.core:Wizard', 'build=sailboat.build:Build', 'pypi=sailboat.builders:PyPi', 'homebrew=sailboat.builders:Homebrew', 'pyinstaller=sailboat.builders:PyInstaller', 'actions=sailboat.builders:Actions', 'tasks=sailboat.other:Tasks', 'build_docs_readme=sailboat.other:BuildDocs', 'setcodeversion=sailboat.other:SetVersion']},
"author": "Cole Wilson",
Expand Down

0 comments on commit 0eebeea

Please sign in to comment.