Git Product home page Git Product logo

debinate's People

Contributors

brent-knight-bl avatar dirkraft avatar rholder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

debinate's Issues

Install dependencies in specific order

There exist some projects that don't play well together when installed in the same pip install run. Provide a mechanism that installs required dependencies explicitly in the order they are specified instead of how the dependency graph is resolved from setuptools.

OSX hiccups

Should either provide instructions, or get fancy and detect and prefer some of these non-BSD alternatives.

I had to

ln -s /usr/local/bin/gfind /usr/local/bin/find
ln -s /usr/local/bin/gxargs /usr/local/bin/xargs

which makes sense for me because my /usr/local/bin is before /usr/bin (where BSD commands live)

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:... #and so on

md5/md5sum may also be problematic but I already linked both command names in the past for reasons.

For completeness, the g* utils come from brew install coreutils

Add ability to use cached virtualenv's

Changes to dependencies held in a virtualenv are not as frequent as application code changes. Add an option to allow the user to use the cached virtualenv in /opt (where things are built) to avoid having to incur the time to compile/build/etc. for each packaging.

Add install directory prefix

Add a feature to customize the target directory that the project is installed in. Currently it's hardcoded to /opt.

Installation fails on OSX 10.11.4 with "illegal group name"

$ sudo curl -o /usr/local/bin/debinate -L https://github.com/rholder/debinate/releases/download/v0.5.0/debinate && \
> sudo chmod +x /usr/local/bin/debinate && \
> sudo chown $USER:$USER /opt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   581    0   581    0     0   1636      0 --:--:-- --:--:-- --:--:--  1641
100 17550  100 17550    0     0  14109      0  0:00:01  0:00:01 --:--:--  103k
chown: amcclosky: illegal group name

Corrected it with:

sudo chown $USER:staff /opt

Failed building wheel for distribute when using debinate package

I have seen this when building a few different debinate projects (all have been python3)

↪ export DEBINATE_PYTHON=$(which python3)
↪ debinate package
Cleaning out .debinate/target
Cleaning out .debinate/build
Building mything - 1.0.0
Clearing any virtualenv in /opt/mything/.virtualenv
Found requirements.txt, installing dependencies in order first...
Creating new virtualenv in /opt/mything/.virtualenv...
Using base prefix '/usr'
New python executable in /opt/mything/.virtualenv/bin/python3
Also creating executable in /opt/mything/.virtualenv/bin/python
Installing setuptools, pip, wheel...done.
Running virtualenv with interpreter /usr/bin/python3
Collecting distribute==0.7.3
  Using cached distribute-0.7.3.zip
Requirement already satisfied: setuptools>=0.7 in /opt/mything/.virtualenv/lib/python3.5/site-packages (from distribute==0.7.3)
Requirement already satisfied: appdirs>=1.4.0 in /opt/mything/.virtualenv/lib/python3.5/site-packages (from setuptools>=0.7->distribute==0.7.3)
Requirement already satisfied: packaging>=16.8 in /opt/mything/.virtualenv/lib/python3.5/site-packages (from setuptools>=0.7->distribute==0.7.3)
Requirement already satisfied: six>=1.10.0 in /opt/mything/.virtualenv/lib/python3.5/site-packages (from setuptools>=0.7->distribute==0.7.3)
Requirement already satisfied: pyparsing in /opt/mything/.virtualenv/lib/python3.5/site-packages (from packaging>=16.8->setuptools>=0.7->distribute==0.7.3)
Building wheels for collected packages: distribute
  Running setup.py bdist_wheel for distribute: started
  Running setup.py bdist_wheel for distribute: finished with status 'error'
  Complete output from command /opt/mything/.virtualenv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zfa2fsu2/distribute/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp6oxttpbvpip-wheel- --python-tag cp35:
  Traceback (most recent call last):
    File "/tmp/pip-build-zfa2fsu2/distribute/pkg_resources.py", line 2680, in _dep_map
      return self.__dep_map
    File "/tmp/pip-build-zfa2fsu2/distribute/pkg_resources.py", line 2525, in __getattr__
      raise AttributeError(attr)
  AttributeError: _DistInfoDistribution__dep_map
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-zfa2fsu2/distribute/setup.py", line 58, in <module>
      setuptools.setup(**setup_params)
    File "/usr/lib/python3.5/distutils/core.py", line 134, in setup
      ok = dist.parse_command_line()
    File "/tmp/pip-build-zfa2fsu2/distribute/setuptools/dist.py", line 276, in parse_command_line
      result = _Distribution.parse_command_line(self)
    File "/usr/lib/python3.5/distutils/dist.py", line 472, in parse_command_line
      args = self._parse_command_opts(parser, args)
    File "/tmp/pip-build-zfa2fsu2/distribute/setuptools/dist.py", line 602, in _parse_command_opts
      nargs = _Distribution._parse_command_opts(self, parser, args)
    File "/usr/lib/python3.5/distutils/dist.py", line 528, in _parse_command_opts
      cmd_class = self.get_command_class(command)
    File "/tmp/pip-build-zfa2fsu2/distribute/setuptools/dist.py", line 406, in get_command_class
      ep.require(installer=self.fetch_build_egg)
    File "/tmp/pip-build-zfa2fsu2/distribute/pkg_resources.py", line 2254, in require
      working_set.resolve(self.dist.requires(self.extras),env,installer)))
    File "/tmp/pip-build-zfa2fsu2/distribute/pkg_resources.py", line 2471, in requires
      dm = self._dep_map
    File "/tmp/pip-build-zfa2fsu2/distribute/pkg_resources.py", line 2682, in _dep_map
      self.__dep_map = self._compute_dependencies()
    File "/tmp/pip-build-zfa2fsu2/distribute/pkg_resources.py", line 2699, in _compute_dependencies
      from _markerlib import compile as compile_marker
  ImportError: No module named '_markerlib'
  
  ----------------------------------------
  Failed building wheel for distribute
  Running setup.py clean for distribute
Failed to build distribute
Installing collected packages: distribute
  Running setup.py install for distribute: started
    Running setup.py install for distribute: finished with status 'done'
Successfully installed distribute-0.7.3
...

and it continues on to install all dependencies defined in requirements.txt. debinate package goes on to finish, and I have not found any issues with the generated deb files when this distribute error is present.

I have also found that if I remove my requirements.txt file, and instead define the dependencies in setup.py debinate follows this code path instead where pip install distribute==0.7.3 is not run. I do not see the error in this case, and I have also not experienced issues with the generated deb file this way either.

A little more details on my environment:

↪ cat /etc/os-release                                                                                                                                                                            1 ↵
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

↪ debinate --version
Debinate 0.6.0 - roll up your project into a Debian package

↪ python3 --version                                                                                                                                                                              1 ↵
Python 3.5.2

TL;DR I don't know if this is an issue or not (hasn't been for me), but a distribute error in the logs is a little worrisome.

Add example project

Create an end to end working example project that demonstrates the functionality available in debinate.

Temp build files not deleted

The temp dir created during deb generation is never deleted, which can lead to a full hard drive. It would be helpful if debinate cleaned up after itself, since it's easier than the calling process trying to find out what the temp dir was named. 💩

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.