question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create a python package

See original GitHub issue

It would be useful to have a package to manage dotfiles outside ~/, something like this (considering you already have a dotfiles repo installed and configured):

pip install dotbot
mkdir project
cd project
git init
dotbot --install gitignore-language-template

Where the file is inside the dotfiles dir and the install command would copy instead of symlinking. Where is the dotfiles dir? I guess that could be configured inside a dotfile 😉

This would make the dotfiles templating management works for projects outside ~/, which is an nice-to-have feature

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
anishathalyecommented, Apr 6, 2018

Hmm, true. I actually like the submodule setup quite a bit, so I’m not going to remove it, but there’s no harm in making this available as a PyPI package as well.

So let’s do it! I’ll probably have time sometime in the next week or so to push this out.

1reaction
gilmrjccommented, Jul 5, 2016

Well even in a fresh system I see the package option as something better, but this is just my opinion because I prefer to pip install instead of downloading files. It’s easier for me to keep up to date with the project.

Also note that the package can coexist with the current interface. There is no reason to wipe out the install script. In fact if the dotbot have its own library like pointed in #75 the install script and the command line can use the same functions. So both options can be implemented with all the logic in the same place.

Install dotfiles

If you use dotbot you have python, and surely you have pip, so just do:

pip install dotbot
git clone git:my-dotfiles-repo ~/.dotfiles
dotbot

In a fresh system I have to do

git clone git:my-dotfiles-repo ~/.dotfiles
cd ~/.dotfiles
python ./install.py

Almost the same, but more power with the package installed (ok, this is true only if it includes the other options)

Create dotfiles repo

The initscript can be implemented in python to make this posible:

pip install dotbot
dotbot --create

With the initscript

curl -fsSLO https://raw.githubusercontent.com/Vaelatern/init-dotfiles/master/init_dotfiles.sh
./init_dotfiles.sh
Read more comments on GitHub >

github_iconTop Results From Across the Web

Packaging Python Projects
This tutorial walks you through how to package a simple Python project. It will show you how to add the necessary files and...
Read more >
Making a Python Package
Create the basic package structure · Write a setup.py · pip install -e . · Put some tests in package/test · pytest in...
Read more >
How to Build Your Very First Python Package - freeCodeCamp
PyPi is the official Python repository where all Python packages are stored. You can think of it as the Github for Python Packages....
Read more >
How to create a Python package in 2022 - Mathspp
In order to create a Python package, you need to write the code that implements the functionality you want to put in your...
Read more >
How to Create Python Packages - Towards Data Science
Python packages can be created and uploaded to PyPI to create pip installable code. We will learn how to structure, build, and deploy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found