Skip to content

Commit

Permalink
Merge pull request #1 from mrakitin/hxnfly
Browse files Browse the repository at this point in the history
Add a patch to fix username
  • Loading branch information
kbeeperez authored Jul 20, 2021
2 parents 4e54f3c + b38f48f commit 1ef0495
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
25 changes: 25 additions & 0 deletions recipes/pyolog/0001-Fix-defaults-for-username.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 34b869ef91567bd0fa6d8048517a4cc1eeeb0dc6 Mon Sep 17 00:00:00 2001
From: Maksim Rakitin <[email protected]>
Date: Mon, 19 Jul 2021 12:03:17 -0400
Subject: [PATCH] Fix defaults for username

---
pyOlog/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyOlog/conf.py b/pyOlog/conf.py
index 21b269e..04acb9c 100644
--- a/pyOlog/conf.py
+++ b/pyOlog/conf.py
@@ -22,7 +22,7 @@ logger = logging.getLogger(__name__)

class Config(object):
defaults = {'url': 'http://localhost:8181/Olog',
- 'username': os.environ['USER']}
+ 'username': getpass.getuser()}
conf_files = ['/etc/pyOlog.conf',
os.path.expanduser('~/pyOlog.conf'),
os.path.expanduser('~/.pyOlog.conf'),
--
2.16.1

10 changes: 6 additions & 4 deletions recipes/pyolog/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ package:
source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
- 0001-Fix-defaults-for-username.patch

build:
number: 0
skip: true # [win]
noarch: python
entry_points:
- olog = pyOlog.cli:main
- ologgui = pyOlog.gui:main
script: {{ PYTHON }} -m pip install . --no-deps -vv

requirements:
host:
- python
- python >=3.6
- pip
run:
- python
- python >=3.6
- ipython
- keyring
- requests
Expand All @@ -37,7 +39,7 @@ about:
home: https://github.com/NSLS-II/pyOlog
license: MIT
license_file: LICENSE.md
summary: Python client for the OLog
summary: Python client library for OLog

extra:
recipe-maintainers:
Expand Down

0 comments on commit 1ef0495

Please sign in to comment.