File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,3 +183,20 @@ git clone git@github.com:antoniosarosi/pycritty
183183cd pycritty
184184python -m pycritty.main
185185` ` `
186+
187+ # # Publishing
188+
189+ # ## PyPi
190+
191+ ` ` ` bash
192+ # First make sure you have these packages installed
193+ pip install --user --upgrade setuptools wheel twine
194+ # Generate distribution files
195+ python setup.py sdist bdist_wheel
196+ # Test upload
197+ python -m twine upload --repository testpypi dist/*
198+ # Test download
199+ pip install -i https://test.pypi.org/simple/ --no-deps pycritty
200+ # Upload to PyPi
201+ python -m twine upload --repository pypi dist/*
202+ ` ` `
Original file line number Diff line number Diff line change 11from pathlib import Path
2- from .resource import ConfigFile , ConfigDir
2+ from pycritty . resources .resource import ConfigFile , ConfigDir
33
44
5- base_dir = ConfigDir (Path ().home () / '.config' / 'alacritty' )
6- config_file = ConfigFile (base_dir .path , 'alacritty' , ConfigFile .YAML )
7- fonts_file = ConfigFile (base_dir .path , 'fonts' , ConfigFile .YAML )
8- themes_dir = ConfigDir (base_dir .path / 'themes' )
9- saves_dir = ConfigDir (base_dir .path / 'saves' )
5+ pycritty_dir = ConfigDir (Path ().home () / '.config' / 'pycritty' )
6+ alacritty_dir = ConfigDir (Path ().home () / '.config' / 'alacritty' )
7+ config_file = ConfigFile (alacritty_dir .path , 'alacritty' , ConfigFile .YAML )
8+ fonts_file = ConfigFile (pycritty_dir .path , 'fonts' , ConfigFile .YAML )
9+ themes_dir = ConfigDir (pycritty_dir .path / 'themes' )
10+ saves_dir = ConfigDir (pycritty_dir .path / 'saves' )
1011
1112
1213def get_theme (theme : str ) -> ConfigFile :
Original file line number Diff line number Diff line change 22from setuptools .command .install import install
33from pathlib import Path
44from pycritty import __version__
5- from pycritty .resources import base_dir , config_file
5+ from pycritty .resources import pycritty_dir , alacritty_dir , config_file
66
77
88class PostInstallHook (install ):
@@ -23,7 +23,8 @@ def run(self):
2323
2424 def hook (self ):
2525 installation_resources = Path (__file__ ).parent / 'config'
26- base_dir .create ()
26+ pycritty_dir .create ()
27+ alacritty_dir .create ()
2728 config_file .create ()
2829
2930 theme_files = list ((installation_resources / 'themes' ).iterdir ())
@@ -39,7 +40,7 @@ def hook(self):
3940 if f .stem in include :
4041 self .exclude .remove (f )
4142
42- self .cp (installation_resources , base_dir .path )
43+ self .cp (installation_resources , pycritty_dir .path )
4344
4445 def cp (self , src_dir : Path , dest_dir : Path ):
4546 for src_child in src_dir .iterdir ():
You can’t perform that action at this time.
0 commit comments